Naseef-Ur-Rahman wrote:
Yes the setup project is bundled with Visual Studio.
Do yourself a big favor and listen to my good friendly advice: throw out this trash. This project type is discontinued to Microsoft, by some very good reasons, and is not even legitimate to Visual Studio.
These day, the really legitimate product is open-source (first Microsoft's open-source product) WiX (presently provided by Microsoft-sponsored Outercurve Foundation, by Microsoft Reciprocal License):
http://en.wikipedia.org/wiki/WiX,
http://wixtoolset.org/,
http://wix.codeplex.com/.
This is the only product I know correctly integrated with MSBuild and fully compliant with MSBuild project standard. The problem you mentioned would sound ridiculous. I know because I using it myself.
[EDIT]
This is a very basic document on the user-entered target directory:
http://wixtoolset.org/documentation/manual/v3/wixui/dialog_reference/wixui_installdir.html.
I suggest you read WiX documentation and just search information on your concern on the Web, before you ask further questions yourself. Community of developers actively shares a lot of solutions, but your problem is very standard.
—SA