Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whats the best way to create a desktop shortcut ?
Message
From
17/01/2001 20:43:48
 
 
To
17/01/2001 10:12:33
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00464645
Message ID:
00464980
Views:
10
>>>>>>>>>>>>
I need to create a desktop shortcut after setup. Want to do it within another program. What is the best way ?
>>>>>>>>>>>>

Use WSH:
oWsh = CreateObject("WScript.Shell")
cDesktopDir = oWsh.SpecialFolders("Desktop")
oLnk = oWsh.CreateShortcut(cDesktopDir + "\\Shortcut to Notepad.lnk")
oLnk.TargetPath = cDesktopDir + "\\notepad.lnk"
oLnk.Save()


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform