Create MSI from Command Line

Before continuing, the limitation of this method is that you need visual studio installed in the machine where you want to build the MSI. So now that i put the gotcha up front lets proceed. all u got to do is
devenv MySetUpproject.vdproj /rebuild

and u get a new setup.msi and setup.exe.

what i'm currently doing is using a batch file to do this

this is my complete batch file


D:
cd D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
devenv %1\Service.sln /project "Setup\Setup.vdproj" /projectconfig Release /rebuild


I'm setting the path to my devenv folder and then calling the devenv exe from command line using a parameter sent to the batch file (%1). :)..since we are giving a switch devenv wont open and build the project from the command line itself.