Chatur
Chatur

Reputation: 431

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 selected 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".......

Upvotes: 1

Views: 6520

Answers (2)

Cédric Guillemette
Cédric Guillemette

Reputation: 2408

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. alt text

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.

Upvotes: 1

bahadir arslan
bahadir arslan

Reputation: 4762

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.

Upvotes: 0

Related Questions