Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a shortcut programmaticaly
Message
From
12/06/2001 08:31:30
 
 
To
11/06/2001 20:59:03
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00518109
Message ID:
00518296
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform