How to check command line output?

Hi guys.

I am using teamcity for build my site, but before i upload it to server i need turn off IIS. I use command line for this
"iisreset workserver1 /stop" and it should stop IIS server on workserver1. The problem here it can fail too and show command line response with some error.
How i can add some logic which get output from this command line and parse it it show or this step was successful or fail.


1 comment
Comment actions Permalink

Write a wrapper that does the parsing, then call the wrapper.
IMO, you should avoid text parsing and rely only on the return codes.


Please sign in to leave a comment.