开发者

visual studio Setup and Deployment Installation Folder

The 'DefaultLocation' for my application is set to '[ProgramFilesFolder]\MyApp'. Now I would like the user to select what drive to install this application to. I know this is accomplished through the 'Installation Folder Selection' dialog, but I want the user to be able to select a drive only, not the entire path.

My question is how do I capture what drive the user se开发者_如何学JAVAlected from the 'Installation Folder Selection' dialog and use that drive letter to tack on to my 'DefaultLocation' variable?

Example: If the user selected "M:\" from the installation folder selection dialog, I want to install to "M:\Program Files\MyApp" or if the user selected "E:\", then install to "E:\Program Files\MyApp".......


I never did that but I think its possible...

Select you setup project. Then, click the "User Interface" button in the toolbar of the Solution Explorer.

visual studio Setup and Deployment Installation Folder

Then you should see the "User Interface" window (left on screenshot). You will see the "Installation Folder" dialog. Delete and add your own dialog by right-clicking on the "Start" node and selecting "Add Dialog".

No dialog exists that lets you select a drive. You may use the RadioButton and predefine 3 most common drive letters. I know this is not neat but its a workaround if you don't wan't to purchase a tool.


You can create setup projects with a project type in Visual Studio 2010 that's name is Setup/Deploy Project.

Or Visual Studio 2010 has a Install Shied Limited Edition project.

So you can use this and create more professional setups.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜