I am trying to run a batch file automatically during a build from a TFS build workflow. I have added an InvokeProcess activity with the following:
Arguments: "\\" + agent + " /accepteula -u username -p password -d C:\HelloWorld.bat"
FileName: "PsExec.exe"
OutputEncoding: System.Text.Encoding.GetEncoding(System.Globalization.CultureInfo.InstalledUICulture.TextInfo.OEMCodePage)
WorkingDirectory: "C:\PSTools"
I have ensured that both the build agent and the build controller have access to the "agent" in question. I have also ensured the PsExec.exe is located in the "C:\\PSTools" folder as defined.
When executing the build I get the error "File not found: PsExec.exe" Does anyone have any idea what would cause this error in this situation?
您可以尝试使用FileName:“C:\\ PSTools \\ PsExec.exe”
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.