The only way I am aware of is by using the Build Events.
You can reach it by going to the project properties and select Common Properotes -> Build Events.
In there you'll be able to place a command (or set of command) or even a batch file (or .js/.vbs file) that will be execute before and/or after the build.
You'll also get support of various macros defined in the environment such as output directory build type and so on.
Is this what you are looking for?