Search code examples
c#visual-studio-2012installationvisual-studio-setup-proje

How to link two dialog boxes into an installer projects ( c# - VS 2013)


I'm working on Visual Studio 2013, with the add-on Visual Studio Installer Projects. I have created a setup projet ( "MySetup" ) to install few personal components into a customer's PC. I want to let the possibility to the operator to choose the components he will want to install.

I want a first dialog box with two options :

  • Install all components
  • I want to choose one by one

And, if the operator choose the second option, I want display a second dialog box :

  • component 1
  • component 2 ...

But, for the moment, if I put the two dialog boxes into my setup project, the second one is displayed all the time. I don't know how to control the display of the second dialog box according to the choice of the first one.

I searched into microsoft documentation, but I didn't find anything:

How to: Add and Remove Installation Dialog Boxes in the User Interface Editor
How to: Customize Installation Dialog Boxes in the User Interface Editor


Solution

  • There's no support for custom dialogs in a Visual Studio installer project, just the canned dialogs that can be added. There is also no support for conditional dialogs based on previous dialog content, nor running code when dialog buttons are clicked. Visual Studio setup projects don't offer the full range of Windows Installer capabilities when compared to WiX, InstallShield, Advanced Installer and others.

    You'll see some articles (Code Project I believe) about going into the raw dialog files with tools such as Orca to change the format and flow of dialogs but you'll be in there with the raw MSI tables.

    If you have seen other installs where the user gets to choose what's installed and can also go into maintenance mode later to change what's installed, this is always done with features, and I use this word because "component" has a specific meaning in windows installer, as does "feature".