Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I create a desktop shortcut for my app?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00316189
Message ID:
00330856
Views:
9
>>You can use my lnkfiles.dll to do this, but you can also use the Windows Script Host (WSH). Here's a sample.
>>* lcfile is the file the link will point to
>>* lcname is the name of the shortcut to appear on the desktop
>>* with the lnk extension
>>oShell = CREATEOBJECT('WScript.Shell')
>>lcdesktop = oShell.SpecialFolders('Desktop')
>>oLink = oShell.CreateShortcut(lcdesktop + "\" + lcname)
>>oLink.TargetPath = lcfile
>>oLink.Save
>
>Hi George - I may give up as "futile" my idea of using a drag/drop shortcut icon in an email for a desktop link. This looks like the next-best idea - do you (or anyone else) know if it's possible to run something like this in a setup post-executable, where it picks up the path of any server?

Yep - piece of cake. If the post-setup executable is located in the network directory, you can pick up the directory with SYS(16,0).
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform