I was deploying a SharePoint solution today and had put together a bunch of .cmd files for the operations team to use. So I sat with the team as they ran the scripts and lo and behold I had deployed the .wsp with the debug dll instead of the release .dll so some of my feature activation code broke (the debug code was looking for security groups that existed on my dev box).
Anyway, what I had done was give the team the instructions to run the .cmd files like so:
C:\DeploymentFolder\ActivateFeatures.cmd > ActivateFeaturesOutput.txt
When the operations person ran this I noticed that the error message appeared in the command prompt – hmmmmm. Of course the operations person just said “oh that’s because your STDOUT and STDERR are two different things, Unix you know”.
A quick search and I found that what I should have done was:
C:\DeploymentFolder\ActivateFeatures.cmd 1> ActivateFeaturesOutput.txt 2>&1
Courtesy of http://support.microsoft.com/kb/110930.