We have come to an interesting problem at work this week: we had a post build event in a Visual Studio 2005 project that is very convenient for developer to have, but we didn't want it to run on CruiseControl.NET/continuous integration build.
The problem has a really easy solution if you remember that post event build is actually converted to .bat file, written to output folder and ran -you can write a simple if statement and bail out.
Just put this as a first line of post build event and you're set. Replace "MYMACHINE" with actual machine name, of course.
if %COMPUTERNAME% EQU MYMACHINE exit