我有一个快捷方式'target' "C:\Users\Public\TestPro\TestPro Automation Framework\taf.js"
。
我想从批处理文件运行该文件,因此我将"C:\Users\Public\TestPro\TestPro Automation Framework\taf.js"
命令行复制到cmd.exe,然后按Enter。没啥事儿。
如何"C:\Users\Public\TestPro\TestPro Automation Framework\taf.js"
在Windows7上从命令行运行?
更新
js文件包含
var WshShell = new ActiveXObject("Wscript.Shell");
WshShell.run("java -Dlog.dir=%TEMP% -jar taf-loader.jar", 0, false);
WScript.exit;
我试图同时运行js文件,Wscript.exe
并Cscript.exe
按照@Serge的建议运行,但没有任何效果=我通过双击启动的程序尚未启动。也没有错误。
C:\>Cscript.exe "C:\Users\Public\TestPro\TestPro Automation Framework\taf.js"
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
C:\>Wscript.exe "C:\Users\Public\TestPro\TestPro Automation Framework\taf.js"
C:\>