Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Create Shortcuts/Get Desktop Folder
Message
From
14/01/2004 11:40:52
 
 
To
14/01/2004 11:21:21
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00866766
Message ID:
00866779
Views:
24
>Does any one know how to create a windows shortcut programatically?
>
>And along with that determine the Desktop folder to save it into?
>

For only Win2k or + you can:
DECLARE INTEGER CreateShellLink IN LNKFILES.DLL;
STRING @lpzLinkFileName, STRING @lpzExeFileName


oShell = CREATEOBJECT("WScript.Shell")
oFso = CreateObject("Scripting.FileSystemObject")
cwdesktopfolder = oShell.SpecialFolders("Desktop")


lnErrorCode = CreateShellLink(cwdesktopfolder+"\My Shortcut.lnk","c:\myfolder\myapp.exe")
HTH


Clauido
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform