Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In a Visual Studio Setup Project, How do I make update of the Registry conditional on a Checkbox dialog?

Currently I use Registry Settings within the Setup Project to set the file associations and the icon for the associated files for my application.

Registry settings

In the generic VS Setup project, the update to the registry is done always. How can I make the update to the registry conditional on the state of a checkbox dialog?

alt text

like image 552
Cheeso Avatar asked Aug 30 '09 21:08

Cheeso


1 Answers

The key is to attach a condition to the Checkbox, and then perform the update based on the condition.

First, open the UI designer for your Setup Project.

Open UI Designer

Then, add a new dialog to the UI flow.

Add a dialog

Select one of the Checkboxes dialogs. Any one, they are all the same.

Select a checkbox dialog

You then have a new dialog in your UI Flow. Click on it.

new dialog

In the property sheet, specify the name for the checkbox "property". This symbol will take the value 1 if the checkbox is checked, something other than 1 (I don't know) if unchecked.

checkbox property

Finally, attach to one of your other installer actions, a condition, using that property. For example, you can conditionally update a registry key or value, only if that checkbox has been checked. View the registry designer, then select a node:

Registry designer

Then in the property sheet, specify CONDITION=1, for the condition, where CONDITION is the name of the property you attached to the checkbox in the step prior.

Specify the condition

like image 95
Cheeso Avatar answered Nov 11 '22 01:11

Cheeso