I know this is an old thread, but I just hit the same problem and i found a different solution. so for anybody in the same situation:
If you go to the propreties of your project (not the GDB-properties!!!, normal Visual Studion properties) you open the NMAKE configuration property. you see three lines starting with the ‘build command line’ and it is filled with the Visual-GDB-commandline like: “$(VISUALGDB_DIR)\VisualGDB.exe” /build “$(ProjectPath)” ….
click on the line and see, that there is a pop-up triangle on the right side of the edit field. click it and click ‘edit…’. An extra window opens with one line – the
“$(VISUALGDB_DIR)\VisualGDB.exe” /build “$(ProjectPath)”…
line. you can now add a line before (pre-build execution) or after it (post-build execution). Do the same to the other lines, if you wish.
I used it for SubWCRev.exe to automatically build myself a version.h from the SVN repository at pre-build-time and it works like a charm.
cheers