Web Deployment Tool (MS Deploy)
Web Deploy - RunCommand Exit Code Warning on 0x0...
Last post Mar 16, 2012 06:06 PM by krolson
Mar 14, 2012 02:35 PM|hightechtime73|LINK
First off, I am new to Web Deploy. I recently watched the Mix10 video by Scott H. concerning deployment via xcopy is most likely wrong (previously I had used VBS scripts to guarantee server configs were identical)... That said, I was hooked, but the learning
curve has been steep. What I need to configure, is not readily configurable from Studio 2010's limited exposure. I have created a mock IIS site and exported the application and am tweaking the archive and parameter xmls do perform the other necessary tasks...
Now to the question. I added a RunCommand to do a file copy. When run, the copy succeeds and the runCommand provider logs a warning in the interface that the command exited with code 0x0. Is there any way to specify the expected return code to suppress
this confusing warning? Ideally I'd love to go further to say that any non-zero return code should be an Error instead of a Warning too...
Mar 16, 2012 09:26 AM|Lloydz|LINK
As I know, 0x0 means "The operation completed successfully" and you can simply ignore this warning. Based on my experience, if the command failed to execute, you should receive the exact error rather than a warning. And in this case you can add "-debug -verbose"
to collect more information.
Mar 16, 2012 06:06 PM|krolson|LINK
Just to let you know, there is a new option in our v3 beta for runCommand that may help - you can actually specify a set of "successErrorCodes" as a provider setting, so that any other return code will result in an error being logged. If you get help on
runCommand (msdeploy.exe -source:runCommand -help) you would see the following:
Provider Setting: successReturnCodes
A semicolon (;) separated list of return values that will be treated as a success for the command. If
specified, all other return values will be treated as errors.
This is new in the v3 beta, which you can get here:
Hope that helps!