'cscript' is not recognized inside a batch
24,520
Solution 1
By mistake i was using a variable with name "path", so cscript stopped working.
Solution 2
Very simply you solve this issue. but before that you must ensure the cscript.exe file exist in your C:\Windows\System32 path. then,
%SystemRoot%\System32\then your command line
Comments
-
Javier Chauvin almost 3 years
I need to call a .bat that calls a .vbs. When i run FindDir.vbs from command prompt is ok, but when i try to call it from CallingVbs.bat i got the error message.
'cscript' is not recognized as an internal or external command.
The code i'm using to call .vbs is the same to .bat and to command prompt.
cscript FindDir.vbs
Both files are in same folder. I do not understand why cscript command works in command prompt but not in .bat. Could anyone explain me why it happens?
Thanks