JustScriptIt
Technical User
Hello,
I am running a script to read a certain registry value on remote computers in the domain.
When I open command prompt, I right-click, select "Run as another user", and enter in the credentials.
The command prompt opens, I go to the directory with the script, and I type in
cscript scriptname.vbs
The script then prompts me for the filename with the list of computers, no problem, the script executes and outputs the values.
In the middle of execution, I get
"Microsoft VBScript runtime error: The remote
server machine does not exist or is unavailable: 'GetObject'"
Then, the execution terminates.
I believe this is because the credentials I entered are incorrect for one of the computers.
How do I handle the error such that
- It outputs an understandable error message
- The script continues execution
I am running a script to read a certain registry value on remote computers in the domain.
When I open command prompt, I right-click, select "Run as another user", and enter in the credentials.
The command prompt opens, I go to the directory with the script, and I type in
cscript scriptname.vbs
The script then prompts me for the filename with the list of computers, no problem, the script executes and outputs the values.
In the middle of execution, I get
"Microsoft VBScript runtime error: The remote
server machine does not exist or is unavailable: 'GetObject'"
Then, the execution terminates.
I believe this is because the credentials I entered are incorrect for one of the computers.
How do I handle the error such that
- It outputs an understandable error message
- The script continues execution