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:
00330855
Views:
17
>>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?

Hi Bruce,

Best way would be to look at the drives collection of the Scripting.FileSystemObject. You can get drive letter, type etc. I think you can also get the UNC. I'd have to check that last one. I'm just learning this stuff myself. Maybe "Scripting" Ed will jump in.:-)
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform