0

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?

1 Answer 1

2

You can try with FileName: "C:\PSTools\PsExec.exe"

Sign up to request clarification or add additional context in comments.

3 Comments

Actually this worked like a charm... originally I thought it didnt but I tried running the build again and apparently the changes to the workflow had not saved correctly. Thanks a lot!
You responded faster than I could edit my comment, this was the correct answer I am not sure why though since I thought the Working directory was supposed to point to the directory that the "FileName" is contained in.
happy to answer your question Aaron and unlock your problem

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.