vbs script wshshell.exe error

Apr 16, 2014
Reaction score
Having trouble with my .vbs scripts on one particular machine. Error is complaining that on Line 5, Char 18, the system cannot find the file specified.
Script: C:\Users\username\Desktop\ERPM_Installer.vbs
Line: 5
Char: 18
Error: The system cannot find the file specified
Code: 800700002
Source: WshShell.Exec
Here are the first few lines of the vbs script...
Function GetOS()
'Requires WSH 5.6
'CMD window will flash as there is no way to supress it when using exec.
Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
Dim strVer : set strVer = WshShell.exec("%comspec% /c ver")
Dim sResults
sResults = strVer.stdout.readall
What file can it not find?
I have verified with the cscript command that Windows Script Host Version 5.8 is installed.
I have also verified that the env var comspec is set properly to C:\Windows\system32\cmd.exe
Any ideas why it is failing on this particular machine?? Works on every other machine so far...

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vbs to exe 6
Running a VBS script 4
prndrvr waiting from prompt 1
Set wallpaper with a VBS script 18
script to compact database VBS 14
Windows XP Run VBS remotely 0
vbs logon script CopyFile error 2
Automation error 14