A customer of ours has been using two of our programs for some time now with out this problem. Hundreds of other customers using W2000 to W7 have never encountered this problem (same proceedure code for several years)
Then they installed them on two other machines XP-SP3.
5.7 is the current version of WSH.
The program errors out at the following line:
Dim oWScript As Object
Set oWScript = CreateObject("WScript.Shell") 'Error here
and this also produces the same error (Reference to WSH):
Dim oWScript As WshShell
Set oWScript = New WshShell 'Error here
The error is -2147024769: Proceedure could not be found.
Strange. On the "Set" I would have expected a different error.
I gave the customer a Vbs script to test:
and it works, according to the screen shot the customer sent!
I checked all references and objects in my code and this this one proceedeure using WSH is the only place my oWScript is declared.
I am wondering if it has something to do with a security setting for creating ActiveX, but why would the Vbs work?
The customer claims that these two machines were set up identical to the other machines where the programs work, concerning security restrictions.
I am stumped at this one, and have never seen something similar before.
Any help is appreciated.
Then they installed them on two other machines XP-SP3.
5.7 is the current version of WSH.
The program errors out at the following line:
Dim oWScript As Object
Set oWScript = CreateObject("WScript.Shell") 'Error here
and this also produces the same error (Reference to WSH):
Dim oWScript As WshShell
Set oWScript = New WshShell 'Error here
The error is -2147024769: Proceedure could not be found.
Strange. On the "Set" I would have expected a different error.
I gave the customer a Vbs script to test:
Code:
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\MyCompany\Test", "Passed!", "REG_SZ"
WScript.Echo WshShell.RegRead("HKCU\Software\MyCompany\Test")
WshShell.RegDelete "HKCU\Software\MyCompany\Test"
and it works, according to the screen shot the customer sent!
I checked all references and objects in my code and this this one proceedeure using WSH is the only place my oWScript is declared.
I am wondering if it has something to do with a security setting for creating ActiveX, but why would the Vbs work?
The customer claims that these two machines were set up identical to the other machines where the programs work, concerning security restrictions.
I am stumped at this one, and have never seen something similar before.
Any help is appreciated.