Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Hide dialogs
 

Hide dialogs

I want to create a setup project that has a simple and an advanced flow. The first step will show a dialog to choose from one of the flows. The advanced flow shows some dialogs with advanced settings. In the simple mode these dialogs are hidden and the setup will use the default values.

Is it possible to hide a complete dialog in the setup wizard?
Ewald - Please remember to mark the replies as answers if they help.
Ewald Hofman - Avanade  Saturday, January 31, 2009 12:15 PM
Hi Ewald Hofman,

Based on my understanding, you are providing the user two ways of installing, simple and advanced, and you may provide more installer options for the installer while choosing simple only exposes little.

Visual Studio may not support hiding the dialog functionailty. However, Visual Studio predefined various dialog you can add for your setup project, and this is very useful. To hide a dialog, we can resort to the free tool "Orca", which is a msi file editor.

For example, if we want to hide "FolderForm" when we choose the simple installation, we can try the following.
  1. Using Visual Studio to add RadioButton(two buttons) dialog after Welcome Form for the project.
  2. Change the lables to "simple" and "advanced" respectively.
  3. Here we change the name of the ButtonProperty to "BtnProperty".
  4. Build the setup project.
  5. Navigate to the directory which contains the setup.msi in Windows Explorer.
  6. Right click the setup.msi, click "Edit using Orca".(Supposing you've already installed the orca.exe).
  7. In the left panel, select "InstallUISequence".
  8. Choose the "FolderForm" record, and change the condition to "Installed="" AND NOT RESUME AND BtnProperty=1".
  9. Save the changes.

Now when you run the setup.msi, and choose simple in our custom dialog, you will see the "FolderForm", otherwise, you won't. Note that I put the custom RadioButton dialog after Welcome Dialog.

If you have any problem, please feel free to let me know.

Best regards,
Bruce Zhou

Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Monday, February 02, 2009 9:50 AM
Orca doesn't do that, no, but that's because there a bunjch of APIs you can use to update MSI files, and sample VBS scripts. If you install the Windows SDK somewhere there are some .vbs files, scripts to do MSI stuff. Something likeMicrosoft SDKs\Windows\v6.1\Samples\SysMgmt\Msi\scripts.
There is a script called WIRunSql.vbs that will execute MSI Sql statements on a MSI file, so you just need the Sql to update that row. It's be something like this (but this syntax isn't right) Update Control set Condition= <thing> where Control = Folderform . The point is that you can run this script as a post build step somewhere.
Phil Wilson
PhilWilson  Tuesday, February 03, 2009 9:05 PM
Hi Ewald Hofman,

Based on my understanding, you are providing the user two ways of installing, simple and advanced, and you may provide more installer options for the installer while choosing simple only exposes little.

Visual Studio may not support hiding the dialog functionailty. However, Visual Studio predefined various dialog you can add for your setup project, and this is very useful. To hide a dialog, we can resort to the free tool "Orca", which is a msi file editor.

For example, if we want to hide "FolderForm" when we choose the simple installation, we can try the following.
  1. Using Visual Studio to add RadioButton(two buttons) dialog after Welcome Form for the project.
  2. Change the lables to "simple" and "advanced" respectively.
  3. Here we change the name of the ButtonProperty to "BtnProperty".
  4. Build the setup project.
  5. Navigate to the directory which contains the setup.msi in Windows Explorer.
  6. Right click the setup.msi, click "Edit using Orca".(Supposing you've already installed the orca.exe).
  7. In the left panel, select "InstallUISequence".
  8. Choose the "FolderForm" record, and change the condition to "Installed="" AND NOT RESUME AND BtnProperty=1".
  9. Save the changes.

Now when you run the setup.msi, and choose simple in our custom dialog, you will see the "FolderForm", otherwise, you won't. Note that I put the custom RadioButton dialog after Welcome Dialog.

If you have any problem, please feel free to let me know.

Best regards,
Bruce Zhou

Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Monday, February 02, 2009 9:50 AM
Can the Orca tool be used with the command line (to integrate it in the Team Build)?
Ewald - Please remember to mark the replies as answers if they help.
Ewald Hofman - Avanade  Tuesday, February 03, 2009 7:38 PM
Orca doesn't do that, no, but that's because there a bunjch of APIs you can use to update MSI files, and sample VBS scripts. If you install the Windows SDK somewhere there are some .vbs files, scripts to do MSI stuff. Something likeMicrosoft SDKs\Windows\v6.1\Samples\SysMgmt\Msi\scripts.
There is a script called WIRunSql.vbs that will execute MSI Sql statements on a MSI file, so you just need the Sql to update that row. It's be something like this (but this syntax isn't right) Update Control set Condition= <thing> where Control = Folderform . The point is that you can run this script as a post build step somewhere.
Phil Wilson
PhilWilson  Tuesday, February 03, 2009 9:05 PM

You can use google to search for other answers

Custom Search

More Threads

• How to deply clickonce with netmodule file
• MUI in ClickOnce.
• How to detect an installed product?
• Deployment of windows Application on win 98
• VS 2005 Setup & Deployment - Condition Question
• Custom Action dll in C#?
• installing some files in path provided by the user
• VB Express ClickOnce crashing after install
• FTP Publishing Failing in VS 2008 RTM
• Configuration file '<file>' is being used to configure all executables