Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WSH Question
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00418936
Message ID:
00418950
Views:
26
>>>If I use WSH to create a shortcut when installing my program how do I know if WSH is on the clients machine?
>>>
>>>
>>>Thanks
>>
>>I'd recommend checking the registry for the VBScript.RegExp key under HKEY_CLASSES_ROOT. This should tell you not only if the WSH is installed, but if the version is 2.0. Prior to 2.0, this particular object wasn't available.
>
>George just to be sure that I understand you if I find VBScript.RegExp under HKEY_CLASSES_ROOT the existance of that key will tell me that I have version 2.0 not the value of that key..
>
>
>TIA

Yep, basically
SET CLASSLIB TO REGISTRY ADDITIVE
oReg = CREATEOBJECT("Registry")
IF oReg.IsKey("VBScript.RegExp")
  * Version 2.0 of the WSH is installed
ELSE
  * Version 2.0 isn't installed, but 1.0 might be
ENDIF
In order to check for 1.0 you could check for something like the WScript.Shell or Scripting.FileSystemObject.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform