Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") Dim MyShortcut, MyDesktop, DesktopPath ' Lecture du chemin du Bureau en utilisant l'objet WshSpecialFolders DesktopPath = WSHShell.SpecialFolders("Desktop") ' Création d'un objet raccourci sur le Bureau Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\Raccourci vers le Bloc-notes.lnk") ' Paramétrage des propriétés de l'objet raccourci et sauvegarde MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings("%windir%\notepad.exe") MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("%windir%") MyShortcut.WindowStyle = 4 MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings("%windir%\notepad.exe, 0") MyShortcut.Save
Set WSHShell = WScript.CreateObject("WScript.Shell")