1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| sub Shortcut
dim shell,startupPath,Bureau
Set Shell = CreateObject("WScript.Shell")
'startupPath = Shell.SpecialFolders("startup") 'dossier démarrage
Bureau = Shell.SpecialFolders("Desktop") ' le bureau
Set FSO = CreateObject("Scripting.FileSystemObject")
system32=FSO.GetSpecialFolder(1) 'si votre programme se trouve dans le dossier system32 par exemple la calculatrice "calc.exe et tu peut le changer bien sûr
Set link = Shell.CreateShortcut(Bureau & "\Calculatrice.lnk")
link.Description = "Calculatrice"
link.IconLocation = "explorer.exe, 0" 'on peut ici changer l'icon pour le raccourci
link.TargetPath = system32 & "\calc.exe"
link.WorkingDirectory = system32
link.Save
end sub
Call Shortcut |
Partager