Raccourci generer via VBS
Bonjour a Tous
je viens soliciter votre etant aussi developpeur qu'un elephant est léger :lol:
je cherche a faire un shortcut par repertoire reseau avec comme argument "Chemin UNC du repertoire"
pour l'instant j'ai ça
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 'Create a WshShell Object
Set WshShell = Wscript.CreateObject("Wscript.Shell")
'Create a WshShortcut Object
Set oShellLink = WshShell.CreateShortcut("NOM DU RACCOURCI.lnk")
'Set the Target Path for the shortcut
oShellLink.TargetPath = "CHEMIN UNC DE L'EXE"
oShellLink.Arguments = """" + WshShell.CurrentDirectory + """"
oShellLink.WorkingDirectory = "CHEMIN UNC DU REPERTOIRE CONTENANT L'EXE"
'Save the shortcut
oShellLink.Save
'Clean up the WshShortcut Object
Set oShellLink = Nothing |
ça me donne presque ce que je veux mais en argument j'ai le chemin reseau et pas le chemin UNC
si déja ce probleme peut etre resolu ça m'aidera
cerise sur le gateau :
comme je dois créer ce raccourci sur les 160 Repértoires reseaux je pense qu'il est possible de passer des variables comme les chemin UNC des repertoires via un fichier TXT mais la c'est un poil plus baleze
Merci pour votre aide