Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a shortcut programmaticaly
Message
De
12/06/2001 08:31:30
 
 
À
11/06/2001 20:59:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00518109
Message ID:
00518296
Vues:
16
Many thanks to you guys!

I wrapped the following code into my generic procedures file and it became version 1.0 of CreateShortcut (substituting parameters, of course):
 oWshShell                   = CreateObject             ("Wscript.Shell")
 oShellLink                  = oWshShell.CreateShortcut ("MyShortcut.lnk")

 oShellLink.TargetPath       = "C:\MyDirectory\MyProgram.exe"
 oShellLink.Arguments        = "parm1 parm2"
 oShellLink.WorkingDirectory = "C:\StartDirectory"
 oShellLink.IconLocation     = "C:\Graphics\Icons\BookShelf.ico"
 oShellLink.Description      = "Shortcut Comments"
 oShellLink.Save ()
Also found aditional information under "Windows Script Host Reference" at MSDN.

Regards,

Fernando
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform