我想使用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