VBS : Accéder aux propriété d'un raccourci

cs_Maxilie Messages postés 23 Date d'inscription mercredi 12 mars 2003 Statut Membre Dernière intervention 9 décembre 2003 - 3 avril 2003 à 00:19
akiuni Messages postés 11 Date d'inscription lundi 8 mars 2004 Statut Membre Dernière intervention 17 août 2004 - 4 févr. 2005 à 10:07
Comment faire à partir d'un script en vbs pour réccupérer des info sur un raccourci, comme l' emplacement de son icone, le chemin de sa cible,...

Maxilie

1 réponse

akiuni Messages postés 11 Date d'inscription lundi 8 mars 2004 Statut Membre Dernière intervention 17 août 2004
4 févr. 2005 à 10:07
Salut,

j'ai trouvé ce code en cherchant a faire à peu près la même chose que toi. Peut être que ça pourras t'aider !

a+
akiuni

'
' but: accéder aux propriétés d'un raccourci
'


dim strStartMenu, oShellLink


set gwShell = CreateObject("WScript.Shell")
strStartMenu = gwshell.ExpandEnvironmentStrings("%AllUsersProfile%")
set oShellLink = gWshell.CreateShortcut(strStartMenu & "\Bureau\ZeRaccourci.lnk")


oShellLink.TargetPath = "C:\WINDOWS\system32\calc.exe"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "C:\zTools\Winsplit\WinSplit.exe, 0"


oShellLink.Description = "CALCULETTE "


oShellLink.WorkingDirectory = strDesktop


oShellLink.Save
0
Rejoignez-nous