Question

I've created a Visual Studio Setup Project (VS 2010) in which one dialog (4 textboxes) is optional. It depends upon a checkbox selection by user in previous dialog. Is there any way I can skip the optional dialog ?

Was it helpful?

Solution

There are no capabilities in Visual Studio setups to do this. VS setups are going away anyway after VS 2010, so you should choose an MSI-building tool that has this capability.

You could in principle use Orca to manually change the MSI tables, such as the ControlEvent table, but it will be virtually impossible unless you already know how the MSI internals work.

OTHER TIPS

I haven't found out a way to skip a dialog depending upon a control(e.g. checkbox or radiobuttongroup) selection by user in previous dialog; but you can create a custom dialog(ref link1, ref link2) with all required control(s), and then toggle the visibility of the control(s) with "Show/Hide" Action with proper condition statement(e.g. then checkbox or radio buttongroup selection by user in previous dialog), then you can still make it just like skipping a dialog.

Here is my example: The previous dialog control selected value(already set to be either "Foo" or "Bar") is passed through "SELTYPE".

When SELTYPE="Foo", I will show controls named "CustomControlFoo" and "RadioButtonGroup", and also hide the control named "BodyText"; When SELTYPE="Bar", I will hide controls named "CustomControlFoo" and "RadioButtonGroup", and also show the control named "BodyText".

My Custom Dialog

For more information, please read this Micorosoft's official reference: ControlCondition Table

The action that is to be taken on the control. The possible actions are shown in the following table.
Table 2
Value   Meaning
Default     Set control as the default.
Disable     Disable the control.
Enable  Enable the control.
Hide    Hide the control.
Show    Display the control.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top