Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Scipting Host
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00671066
Message ID:
00671176
Views:
17
>>Actually the error does read:
>>
>>Class definition WSCRIPT.NETWORK is not found...
>>
>>And my code reads
>> oNet = CreateObject('WScript.Network')
>>
>>I checked that first thing. Somehow it must not be finding one of the supporting DLLs to create the object.
>
>OK. Check the Registry in that box. You should find WScript.Network under HKLM\Software\Classes.

Alex,

No, I don't think so. Check HKCR\WScript.Network, then get the CLSID. Then get use that to locate it under HKLM\Software\Classes\CLSID\< the actual CLSID >. Here's some code that should unearth what the problem is on that machine. I uses the registry class that comes with VFP.
* Function: GetSrvr.prg
* Author: George Tasker
* Date: July 19, 2000 - 11:45 AM
* Purpose: Retrieves the file location
* of an in process OLE automation server

LPARAMETER pcServer

#INCLUDE REGISTRY.H
LOCAL oReg, lcresult, lcCLSID, lnerr
lcresult = ""
SET CLASSLIB TO REGISTRY ADDITIVE
oReg = CREATEOBJECT('Registry')
RELEASE CLASSLIB REGISTRY
IF oReg.OpenKey(pcServer + '\CLSID') = ERROR_SUCCESS
  lcCLSID = ""
  lnerr = oReg.GetKeyValue('', @lcCLSID)
  IF lnerr = ERROR_SUCCESS
    oReg.CloseKey()
    lckey = "Software\Classes\CLSID\" + lcCLSID + "\InProcServer32"
    IF oReg.OpenKey(lckey, HKEY_LOCAL_MACHINE) = ERROR_SUCCESS
      lcresult = ""
      = oReg.GetKeyValue('', @lcresult)
      oReg.CloseKey()
    ENDIF
  ENDIF
  oReg.CloseKey()
ENDIF
RETURN lcresult
George

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

Click here to load this message in the networking platform