Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a Desktop Link
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00394305
Message ID:
00395273
Vues:
10
>>>Hi, I need to create a desktop link to a VFP5 application as part of the user's installation for the application. I don't see any options in the Setup Wizard to permit this. Is there a way to do this in Setup or in the application project?
>>
>>No, not without a post setup executable. The setup program used by the setup wizard is a 16 bit application. As such it creates the short cuts using the DDE interface with the program manager, and can't retrieve the desktop folder, etc.
>>
>>The easiest way to do this, provided the Windows Script Host is installed, is to use the WScript.Shell object's methods to create the short cut link. If the WSH isn't available, my LNKFILES.DLL (in Files under Win32 and Other APIs) can do this from a post setup executable. The DLL comes with a help file with all the examples in VFP.
>
>George, Please forgive my ignorance, but I'm not familiar with the Windows Script Host. What is it and why wouldn't it be on all Win 95,98 and NT machines (you said ... provided the WSH is installed ...)
>

The Windows Scripting Host did not ship with either Win95 or WinNT, and only version 1.0 shipped with Win98, and was an optional component to install. Win2K was the first OS to ship with WSH 2.0 as a normal part of the OS distribution. It can be added by installation from a number of sources, the best of which is the self-extracting executable available from the MS web site. There's a link to it in my signature block.

The WSH is a set of tools to permit creation and execution of scripts for the WIndows environment; it includes direct support for scripting with VBScript or JScript, as well as providing a number of COM objects which can be used from VFP. The COM objects that ship with it expose a number of Win32 APIs via COM, letting VFP use them much more easily than either implementing calls into the API using DECLARE...DLL or writing C-style DLLs or FLLs to provide similar functionality. There are a number of sites that cover the WSH extensively in my signature block.

The IShellLink API, used to manipulate shortcuts, is exposed through COM by the Wscript.Shell COM object's CreateShortcut method. George wrote a C-style DLL with similar functionality to this one method of the WSH's Wscript.Shell object that can be called from VFP; it requires that George's .DLL ships with the VFP app, but does not require that the WSH gets installed on each target system. OTOH, it doesn't offer the rest of the WSH features.

>Thanks.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform