Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Shortcut on Desktop
Message
From
05/07/1999 10:45:11
 
 
To
04/07/1999 20:18:43
Coann Teng
Computer Infobase System S/B
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00237389
Message ID:
00237486
Views:
9
>Can anyone teach me how to do this? i have a prg/dll, but then i don't know how to determind the folder name for the program using WIN32API...Can anyone help me ?
>

If you're using the Windows Scripting Host automation object, the Wscript.Shell object has a SpecialFolders collection that will give you the information; for example:

oWSH = CREATEOBJ('Wscript.Shell')
? oWsh.SpecialFolders.item('Desktop')

If you're using George Tasker's LNKFILES.DLL to handle the generation of the shortcut, he provides an entrypoint to return selected elements of the SpecialFolders collection in his .DLL; see the documentation for his .DLL. If you're using some other .DLL (the very incomplete implementation from the older article in FoxPro Advisor, for example) you'll need to either write some API code to find it, or explore the registry; there's a Desktop entry for the current user somewhere under the HKEY_CURRENT_USER key in the registry.

My preference is to use the automation object approach because of all the functionality associated with the WSH; George's .DLL is probably the easiest and best approach where you don't want to make installation of the Scripting Host a part of the requirements for your application.
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
Reply
Map
View

Click here to load this message in the networking platform