teamcity powershell - unable to run batch file

Good morning Team City gurus!

A question for ya'll. Our development team has recently set up TeamCity (version 9.0.2, free) on a CI build server. We have the need to call a .bat executable that resides on the CI build server with specific credentials, using a powershell script, as a teamcity build step.

Unfortunately, we are unable to kick off the .bat file we are targetting. Attempts to diagnose have not proven fruitful. Would someone be willing to help us out with this?

For complete details, please take a look at the stack overflow question we have open for this...

http://stackoverflow.com/questions/29262290/teamcity-powershell-unable-to-run-batch-file/29268663?noredirect=1#comment46815743_29268663



Thank you VERY much for the help!

Erik

2 comments
Comment actions Permalink

Just wanted to 'bump' this thread again.

Also, if this forum is not the best way to go about getting an answer like this, what would ya'll recommend? Is there another way to get this kind of support?

Thanks,
Erik

0
Comment actions Permalink

Erik,

-Credential and -NoNewWindow options cannot be used together. I don't see any statements in official Microsoft documentation, but here is a good explanation: http://stackoverflow.com/a/13952569/576361

The solution is to redirect output to a file, and then print in inside your session: http://stackoverflow.com/a/20905237/576361

Also you'll probably need -Wait option to synchronize process execution.

0

Please sign in to leave a comment.