Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WSH not installed on Win95 and WinNT
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00392337
Message ID:
00392387
Views:
8
>I'm making extensive use of WSH for drive mappings and desktop shortcuts in my application framework. After releasing an app, I find out WSH is not installed on 95 and NT. Any suggestions on how I can detect if it is installed and if not, possibly install it during setup or something?
>

Check if the automation object(s) you rely on exist in the registry - for example, if you need the services of Wscript.Shell, there has to be an entry HKEY_CLASSES_ROOT\Wscript.Shell in order for it to exist. If it doesn't exist, the WSH is not present, and you need to isntall it. If it is present, you need to check the version to ensure that the services needed from the automation object are available; either instantiate the object and then try to access the services, or track back through the CLSID to get the name of the file acting as the server, and check the file version using VFP's AGETFILEVERSION() or the FoxTools function equivalent to it prior to VFP6 to ensure that the correct version is present; if not, it needs to be installed.

>Thanx,
>Charlie
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