本文介绍了批处理中无法识别"cscript"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要调用一个调用.vbs的.bat.当我从命令提示符运行FindDir.vbs时可以,但是当我尝试从CallingVbs.bat调用它时,我收到了错误消息.

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'不被识别为内部或外部命令.

'cscript' is not recognized as an internal or external command.

我用于调用.vbs的代码与.bat和命令提示符相同.

The code i'm using to call .vbs is the same to .bat and to command prompt.

cscript FindDir.vbs

两个文件都在同一文件夹中.我不明白为什么cscript命令可以在命令提示符下工作,而不能在.bat中工作.谁能解释我为什么会这样?

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?

谢谢

推荐答案

由于错误,我正在使用名称为"path"的变量,因此cscript停止工作.

By mistake i was using a variable with name "path", so cscript stopped working.

我用此方法解决了

这篇关于批处理中无法识别"cscript"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:34