Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a desktop shortcut
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Creating a desktop shortcut
Divers
Thread ID:
01149668
Message ID:
01149668
Vues:
74
Hi, I am trying to create a shortcut.
SET STEP ON 
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") 
   oShellLink = WshShell.CreateShortcut(strDesktop + "\Newbie Shortcut.lnk") 
   oShellLink.TargetPath = cTarg
  	mtarg =  oShellLink.TargetPath
   oShellLink.WindowStyle = 1 
   oShellLink.IconLocation = "newbie.exe, 0" 
   oShellLink.Description = "new bie Shortcut" 
   oShellLink.WorkingDirectory = "C:\Program Files\Newbie\" 
   mloc = oShellLink.WorkingDirectory 
   oShellLink.Save 
All goes well until I pass cTarg to
oShellLink.TargetPath = cTarg.  I know there is a problem because in the 
next line
mtarg =  oShellLink.TargetPath
in the debugger, I can see that all of the symbols / have been turned into symbol
\. But Newbie.exe will not recognize the username and password unless
I use the "\". Can anyone help?
Thanks
Steve
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform