Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want Setup to create a desktop Icon...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00279281
Message ID:
00279305
Views:
10
>>Anyone know how to get the VFP 6.0 SetupWizard to create a desktop icon? If it has to go in the post .exe has someone already done it?
>>Thanks.
>
>I do this in a post setup executable. I use my LNKFILES.DLL which is available here in the UT download section. (Note there's some errata in the help file describing the return values when the link file is created. It may appear that the function failed when it actually succeeded).
>
>Another option is the Windows Scripting Host. Ed Rauh can give you more complete information on that (and I hope he jumps in).

OK, I'm in ;)

The Windows Script Host has a number of incredibly useful automation objects; one of the, Wscript.Shell, has a CreateShortcut method that can create, examine and modify any .LNK file, and also can maintain shortcuts to URLs. It has a collection that lets you easily examine the Windows SpecialFolders to get the correct location for the DeskTop (or in NT, the AllUsersDeskTop shared by all user profiles.)

WSH is a part of both Win98 and Win2K; it can be added to NT 4 or Win95 either by installing IE4 or later, or in the case of NT, Option pack 4 (requires that SP3 or later is in place), or can be installed on virtually all platforms by running the self-installing executable available from msdn.microsoft.com/scripting - it's fully redistributable. There are a number of other objects (Wscript.Network and Scripting.FileSystemObject specifically) that will be of great use in network and file system manipulations in general, and it provides the ability to build and run VBScript or JScript on the target system on the fly, making it a useful lightweight installation and management tool as well.

Dino Esposito's Windows Script Host Programmer's Reference Guide from WROX Press is an invaluable reference on the WSH, as are the Inside the Box column from back issues of Windows NT Systems magazine (www.ntsystems.com). And there are a ton of web sites covering WSH issues in great detail, too. John Petersen wrote a number of articles on using the WSH with VFP for FoxTalk last year; you can download the articles and source code from www.pinpub.com/foxtalk fro $5/article, and electronic subscribers to FoxTalk have access to the entire back issue collection as a part of their subscription, which makes that very attractive (I am a big fan of FoxTalk, having subscribed for a number of years now, and having an electronic subscription now.)
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