Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a desktop shortcut
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01149668
Message ID:
01149672
Vues:
23
Actually this works. You have to pass the command line
parameters to
oMyShortCut.Arguments = cParameters
Does anyone know how to rename a shortcut?
Thanks
Steve
cTargetPath   = '"C:\Program Files\Newbie\Newbie.exe"'
cParameters   = CHR(32) + cHR(47) + "login Admin" +CHR(32) +CHR(47) +"password asdfasdf"
cParameters   = (cParameters)
cTarg = cTargetPath + cParameters

WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
oMyShortCut= WshShell.CreateShortcut(strDesktop+"\neewbie.lnk")
oShort = oMyShortCut
oMyShortCut.WindowStyle = 1  &&Minimized 0=Maximized  4=Normal 
*oMyShortcut.IconLocation = home()+"wizards\graphics\builder.ico"
oMyShortCut.TargetPath = cTargetPath
otarg = oMyShortCut.TargetPath
oMyShortCut.Arguments = cParameters
oArg = oMyShortCut.Arguments
oMyShortCut.WorkingDirectory = "C:\Program Files\Newbie\"
oMyShortCut.Save
This is from
http://support.microsoft.com/kb/244677/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform