I was having a look at $(Configuration),$(ProjectDir) etc. in Visual Studio 2008 for Prebuild events.
$(Configuration)
$(ProjectDir)
Is there a link to all of these variables with a definition for each one of them?
Try this MSDN page: Macros for Build Commands and Properties