WiX Show Dialog Based on Feature to be Installed - wix

Let me be upfront I am novice with WiX. I have a custom dialog CustomSetupTypeDlg.wxs that changes the Typical/Custom/Complete to Desktop/Server/Suite. It sets WixUI_InstallMode to InstallDesktop, InstallServer and InstallSuite appropriately.
I need to have the user browse for an installation folder depending upon what feature is to be installed. If InstallDesktop or InstallSuite is selected the user has to select two different paths for DESKTOPINSTALLDIRECTORY and SERVERINSTALLDIRECTORY. However if the install mode is InstallServer only SERVERINSTALLDIRECTORY choice should be presented.
I am uncertain on how to go about doing this.

You want to have actions in your InstallExecute sequence that display the dialogs you need. Inside the tag you provide a conditional, which, when true, causes the action to actually happen. See this tutorial, specifically section 5.3 for a list of conditionals.

I decided to simplify the project by splitting the desktop and server features into two separate installers.

Related

I need to remove feature selection screen from my wix installer

I have created a setup using wix installer, During installations user must have to install all features from feature tree, So I don't want to display this feature option screen during installation. Is there any way to achieve this.
Dialog Set: You can select a dialog set without this dialog? Default dialog sets. You are probably using Advanced or Mondo?
Mandatory Features: You can set all features to be mandatory? I guess you might already have done so. Then the user can not do any damage from the GUI (maybe they still can from msiexec.exe command line).
Custom Dialogs: You can create your own dialog set and take it out? Some details here.
Minimalistic sample
Zip version of Minimalistic sample

Can we localize WIX msi and bundle using language selection UI at runtime?

We have an MSI and Bundle created in Wix. I need to localize both of these in such a way that language selection GUI will be popped-up and language can be selected by the user at run time. Would be really appreciated if anybody can help me on this.
For MSI, i am working on creating another bootstapper for bringing-up with language selection combobox and invoke the tranfomed MSI with the required transform(using command shell). I am still not sure about the feasibilty of this approach. I am facing issue in creating combo box in customized UI of bootstapper and invoking batch command to run this msi in the required language.
For Bundle - I am still working on finding a method. if anybody has any idea/samples for this.
It will be helpful if anybody can help me with this issue or provide me with an another alternative method to meet above requirement.
Thanks,
The recommended method (and for that matter, the method used by most MS products), is as you describe.
Create an MSI localized for each language
pick a base and generate MST's
Package the MSTs, the MSI and the bootstrapper, which will
present the language selection dialog and call MSIEXEC, passing TRANSFORM=language.mst as an argument
After the MSIEXEC process has started, all localization is finalized, so to speak. Any selection must go on outside the MSI system.
See this codeproject article for an example.
I guess this may help you:
creating language selection dialog using WiX.
there is a limitation that custom UI for language selection is created using C# based custom bootstrapper. This may lead to the requirement of .Net framework on host machine.
UI selection for MSI
Create an MSI localized for each language
Pick a base and generate MST's
Package the MSTs, the MSI into a bootstrapper.
Customize the HyperlinkTheme.xml to include radio button for selecting each language.
Use the Variable tag to link radio button from UI to .wxs file
Include the msi property in the msi tag and hard code the path to MST's and InstallCondition attribute to differentiate each selection
Use the latest version of wix for this feature support.
Bundle support only automatic base detection there is no support for UI selection

WIX Feature Tree with Checkbox selection

I am in need to add a Features tree with checkbox selection to my msi. Can any one point me to some sample as how to achieve this please?
I already have one Feature element (ProductMain) that installs all the mandatory components. I have tried using the built-in CustomizeDlg and FeaturesDlg but not sure how to change the Selection tree to use Checkboxes
I am using WIXUI_Common set of dialogs.
I would appreciate any suggestion/guidance in this regard.
Sincere thanks!
You're limited to the UI supported by Windows Installer (which is quite limited). I don't think you can customize the SelectionTree control to display checkboxes. Alternatively, you can emulate the desired behavior by placing a number of checkboxes on a dialog and implement a certain logic to set feature levels.

Display files in a directory list control

Is there a way for user to select a specific file using BrowseDlg? All i can find is that you can select only a folder!! I believe File selection is one of the "common" functionality in use.
Can anyone provide some suggestion on how this can be achieved.
Thanks!
Update
I am thinking of creating a C# custom aciton for this, as all other CA in project are in C#. But I am not sure about few things....
How can I sequence this CA dialog with my exsiting UI sequence.
How to trigger a CA on a button click from one of my custom dialog.
How to get the file path back from File Browse CA to be further used by WIX.
The other CAs that I have created does not have any UI associated.
Please advice.
Thanks!
Actually, Windows Installer doesn't have anything built-in for the "Browse for file" dialog. Various vendors offer their custom solutions, like Advanced Installer and InstallShield.
Anyway, this all ends up in a custom dialog and custom action for Browse button. You can find an example of this here (search for "File Browse Dialog" on that page). The package you'll find contains the custom action, sample solution and some notes. It is based on InstallShield, but you can take at least custom action from there (creating a custom dialog in WiX is not that hard). As a last resort, you can try to implement this CA yourself.

WIX: change/repair/remove buttons disabled in WixUI_MaintenanceTypeDlg

I'm using WIX to create an installer and WixUI_Mondo for the UI. Everything had gone well until I stumbled upon a problem with MaintenanceTypeDlg. Things work finely when I install the application, however when I click the MSI later on (when the app is installed), I get change/repair/remove buttons grayed out.
Here are relevant parts of my installation project (sorry, didn't manage to put them inline, since they got cut by the forum software, so had to upload them to pastebin.ca): http://pastebin.ca/1958654.
So, as you see, I'm setting ARPNO*** properties to zero, and, what's more, the log shows these properties set to zero during install. I've also tried to swap include directives, so that UI goes after ControlPanel - unfortunately, with no luck. Any ideas about what am I doing wrong? Thanks in advance.
Don't set the ARPNO* properties; as the documentation says, "setting them" -- i.e., to anything -- disables the ARP behavior.