Variable is undefined on Set oShell ...
I'm tring to run a vb script on the command line and I get this error :
Srcipt: xyz.vbs
Line: 98
Char: 1
Error: Variable is undefined: 'oShell'
Code: 800A01F4
Source: Microsoft VBScript runtime error
and this is the code on line 98:
Set oShell = CreateObject("WScript.Shell")
Do I have to define a variable for oShell ?
What I'm doing wrong ?
Any help is realy apreciate.
The system cannot find the file specified
Thanks that worked, but I'm getting into another problem:
Line100: The system cannot find the file specified!
as the code looks like this:
...
34: cPath = "c:\\Program Files\\Ensim\\Webppliance\\util\\"
...
45: cCmd = "adddomain -s " & cXML
...
98: Dim oShell
99: Set oShell = CreateObject("WScript.Shell")
100: Set oExec = oShell.Exec(cPath & cCmd)
...
The path is ok I have checked many times.