PDA

View Full Version : Check in Visual Build Pro Already Running


marcstober
02-16-2006, 08:08 AM
Is there a simple way to fail a build if another instance of Visual Build Pro is already running (even if it's under another login)?

Ideally it would check if the other build was actually running, not just VBP was open, but that's not required.

I've tried using global macros, which works OK, unless the VBP process gets killed, in which case successive scheduled builds think the first one is still running.

Thanks, Marc

kinook
02-16-2006, 12:07 PM
The attached sample demonstrates using WMI to check for multiple instances of VisBuildPro.exe and exiting the build if more than 1 are found (update the Project script code to use VisBuildCmd.exe if building with the console app). This doesn't check if the other instances are building (WMI doesn't provide window captions, otherwise you could check for '[building]' in the caption if building with the GUI app).