我想使用PowerShell脚本执行EXE文件。如果我使用命令行它的工作原理没有问题(第一我公司供应的可执行文件和一系列参数的名称来调用它):使用PowerShell脚本执行EXE文件
"C:\Program Files\Automated QA\TestExecute 8\Bin\TestExecute.exe" C:\temp\TestProject1\TestProject1.pjs /run /exit /SilentMode
但做一个脚本里面同样的事情会返回一个错误:
The term '"C:\Program Files\Automated QA\TestExecute 8\Bin\TestExecute.exe" C:\temp\TestProject1\TestProject1.pjs /run /exit /SilentMode' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
(我调用使用 “&” 操作命令。)
我怎样才能解决这个问题呢?
请发布您的代码。由于这是问题所在,因此让它看起来比猜测容易得多。 – 2011-01-09 15:14:49