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?
You can try with FileName: "C:\PSTools\PsExec.exe"