Wix Custom Dialog - wix

We are currently having the Classic theme of (Wix) for our installer wizard. Now, we have plan to improve the look and feel of the installer.
1) How i can change the custom dialog classic themes to something else.
2) While installing our setup we have plan to show the some images like slide show. Is it possible to show the images like that in the Wix. Whether I have to create any custom trigger to show the images. Please can you show some examples on this ?

How i can change the custom dialog
classic themes to something else.
Take a look at this other answer where I walk through the things you need to do to create a custom warning dialog and insert it in a custom UI sequence.
While installing our setup we have
plan to show the some images like
slide show. Is it possible to show the
images like that in the Wix. Whether I
have to create any custom trigger to
show the images
This is what the BillBoardAction and BillBoard elements are for. To display bitmaps during the installation of files, I think you would put something like this in the UI sequence definition (I haven't tested it):
<BillboardAction Id="InstallFiles">
<Billboard Id="FirstBillboard" Feature="FeatureA">
<Control Id="FirstBitmap" Type="Bitmap"
Height="300" Width="300" X="0" Y="0">
<Binary Id="HelloWorld.bmp" SourceFile="setupImages\HelloWorld.bmp"/>
</Control>
</Billboard>
<Billboard Id="SecondBillboard" Feature="FeatureB">
<Control Id="SecondBitmap" Type="Bitmap"
Height="300" Width="300" X="0" Y="0">
<Binary Id="HelloAgain.bmp" SourceFile="setupImages\HelloAgain.bmp"/>
</Control>
</Billboard>
</BillboardAction>

Related

How can I make the background of an checkbox transparent in wix?

How can I make the background of the checkbox transparent or white?
That is quite common complaint. The quick answer is - no, there's no way to do it nicely. Let me quote the WiX Toolset tutorial:
And a common complaint: no, the checkbox can't have a transparent
background. If you have a bitmap in the background, it will be ugly,
just like in our example above. The only workaround is to reduce the
width of the checkbox to the actual box itself and to place an
additional static text (these can be made transparent) adjacent to it.
The downside of the workaround described is you won't be able to click the text in the label to check/uncheck the checkbox. You'll have to click directly into the control.
There is, however, one more (even uglier?) workaround: design the final dialog the way to have default grey area to place the checkbox on.
A workaround I have used is to create a new version of the built-in WiX dialog set "Mondo" where I modify the end dialog to contain a much smaller picture which does not cover the whole dialog surface. This should allow the natural background color - normally gray - to fill the rest of the dialog. Screenshot below:
https://github.com/glytzhkof/WiXOpenLogFile
There could be side-effects, but this should allow the dialog's background color to fill the dialog properly:
Main wxs file snippet:
<Binary Id="MyOwnExitBitmap" SourceFile="myOwnExit.bmp" />
Dialog wxs file snippet:
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="70" Height="70" TabSkip="no" Text="MyOwnExitBitmap" />
See full example above on github.com.
Not a direct answer but just another workaround that can be ok in some cases. If that's just one checkbox like launch app/readme/whatever - then it can be placed to the buttons panel which has the same background:

Changing background bitmap in Wix ExitDialog

I want to add a checkbox to the ExitDialog to launch an application after install. I've done that without problems but then I ran into the same problem as everybody else - that checkboxes and radio buttons do not support transparency so the checkbox I've shown has an ugly gray frame around it because of the background bitmap.
I've seen several suggestions about how to make my own exit dialog, resizing the checkbox in combination with a text label. My idea was to show a different and more narrow background bitmap in the ExitDialog (and only that).
In the source I can see that the bitmap is controlled by:
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" />
My question is how to replace the default bitmap with another bitmap for this dialog only?
The Text attribute of the Control element with a type of Bitmap references the Id attribute of a Binary element pointing to a raster graphics image file. If you look at the source code for the UIExtension (which you are using I assume), you will find out that !(loc.ExitDialogBitmap) resolves to WixUI_Bmp_Dialog. So you simply have to create a Binary element with its Id attribute set to WixUI_Bmp_Dialog. Unfortunately this Id is used by 7 other Dialogs in the UIExtension.
Fortunately the localization strings for each of these bitmaps is overridable. So you just have to create a String element in your localization file like this:
<String Id="ExitDialogBitmap">MyOwnExitBitmap</String>
and a corresponding Binary element:
<Binary Id="MyOwnExitBitmap" SourceFile="myOwnExit.bmp" />

How to Remove White Background from Wix Button and Checkbox Property?

i am trying to make an installer. Thw checkBox and button i have added has a white background.
how can i get rid of those white spaces?
<Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="80" Y="200" Width="290" Height="17" Property="INSTALLDESKTOPSHORTCUT"
CheckBoxValue="1" Text="Create a shortcut for this program on the desktop." />
<Control Id="Back" Type="PushButton" Text="Back" X="215" Y="243" Width="60" Height="17">
<Publish Event="NewDialog" Value="SecondDlg" />
</Control>
thnx
Unfortunately, the Windows Installer UI does not support transparent checkboxes. You have a few options:
Move the checkbox to a location that doesn't cover the background. For example, it is common to have a background in the install dialog, then a horizontal line at the bottom of the image then the buttons below the horizontal line. Putting the checkbox below the line with buttons looks good (looks standard) and can use the standard background color.
Make the checkbox control only as big as the checkbox itself then place static text next to the checkbox control with transparent background. This works but it means users must click the checkbox directly. Also, accelerator keys won't work which is an accessibility no-no. But it does look better.
Use an external UI handler to custom draw all your controls. This is easier with Burn in WiX v3.6+. The wixstdba UI can be customized using an XML "theme file". You can get a lot more custom UI than the standard Windows Installer UI supports.
It's all tradeoffs. Pick the one that works best for you.

How to display a list of features, in the WiX based installer, that are going to be installed?

I want to display a list of features that are going to be installed in the windows installer. This list will appear just before the user is about to install the product. I would like to know if there is a standard way to do this using WiX?
I tried to create a separate UI dialog just before the Verify Ready dialog which has a text control. The intention here is to display a text if a feature is being installed and hide that text if it is not being installed.
<Control Id="FeatureText" Type="Text" Text="SomeText">
<Condition Action="show">
<![CDATA[(&feature="3")]]>
</Condition>
<Condition Action="hide">
<![CDATA[(&feature="2")]]>
</Condition>
</Control>
the problem with this code is that the Action specified in the condition is not being performed.
After trying out a number of things I found that:
i- There is no need for quotes around the numbers and
ii- The controls can be set to hidden by default.
The following code is now working for me
<Control Id="FeatureText" Type="Text" Text="SomeText" Hidden="yes">
<Condition Action="show">
<![CDATA[(&feature=3)]]>
</Condition>
</Control>
but what I still don't know is, if this is the best/right way to do what I intend to do...

Including modified FilesInUse dialog in WIX project

I have a modified FilesInUse dialog. Just including it in project and changing reference in UI does not help - I get "ICE20: Standard Dialog: 'FilesInUse' not found in Dialog table" error when building installation project.
Browsing the Net I've found one advice - to supress ICE validation for ICE20. Well, building the project with such settings works fine, and the msi also works fine, but I'm not sure that's a good solution to the problem.
Another advice was to modify FilesInUse and remove WixUIExtension from references, but as far as I know this way I'll end up with copying all the needed dialog files to my project. This I'd like to avoid.
So, what can be done to include my custom FilesInUse in WIX project correctly?
You could use a custom FilesInUse Dialog in the following manner:
<Fragment>
<UI>
<Dialog Id="FilesInUse" Width="370" Height="270" Title="Your product name">
<Control Id="Retry" Type="PushButton" X="304" Y ="243" Width="56" Height="17" Text="Retry" Default="yes" Cancel="yes">
<Publish Event="EndDialog" Value="Retry">1</Publish>
</Control>
<Control Id="Ignore" Type="PushButton" X="235" Y ="243" Width="56" Height="17" Text="Ignore">
<Publish Event="EndDialog" Value="Ignore">1</Publish>
</Control>
<Control Id="Exit" Type="PushButton" X="235" Y ="243" Width="56" Height="17" Text="Exit">
<Publish Event="EndDialog" Value="Exit">1</Publish>
</Control>
<Control Id ="InUseFiles" Type="ListBox" Width="300" Height="150" X="30" Y ="60" Property="FileInUseProcess" Sorted="yes" TabSkip="yes" />
</Dialog>
</UI>
</Fragment>
You just have to reference this Dialog into your Custom InstallDialog with the tag
<DialogRef Id="FilesInUse" />
All the tags mentioned are part of the ICE20 Dialog Requierements
Hope this helps. Have a nice day.
OK, I just spent some time trying to figure out how to solve this problem.
Though there are some good references in suggested thread, I think the FilesInUse dialog is a bit more specific to customize, so I decided to write a more concrete solution to the problem.
See, the problem is that MSI uses the FilesInUse dialog automatically, so if you try to change it somehow, you get errors such as FilesInUse not existing in Dialog table or duplicate FilesInUse dialog in table if you are referencing your custom dialog from other files.
The solution I found working was not to use DialogRef to Wix's FilesInUse dialog at all, but to make my custom dialog in main UI file (Where I would normally put DialogRef to FilesInUse) and name it FilesInUse.
Hope this helps other people having the same problem.
One more wrinkle is that the custom FilesInUse dialog will not be displayed when clicking Uninstall in Programs and Features since the uninstall is run with UILevel 3, so only the built-in FilesInUse will be displayed.
To work around that include this in your product.wxs:
<Property Id="ARPNOREMOVE" Value="1" />
Then when users press the Change (or Modify) button in Programs and Features, the Maintenance dialog will have a Remove button they can use to uninstall, and that will show custom dialogs. Products like Visual Studio only have a Change/Modify button.
One more thing is that Apps and Features (Windows 10) will disable the Modify button if the Uninstall key doesn't have a ModifyPath setting. It should be set to
MsiExec.exe /I{<yourproductcode>}
Your bootstrapper will need to do this. Not sure if the MSI can set it.
If building on the command line: light.exe -sice:ICE20...
If working in Visual Studio: Right click your setup project, select "Properties", Select "Tool settings" on left side of screen, Add "ICE20" to the "Suppress Specific ICE validation:" edit box.
See the related question and answers here: WiX replace dialog
User Yan Sklyarenko answered on Mar 25 '11:
Couple of articles to help you:
WiX
Tutorial
Neil Sleightholm's
article
You should find all the info you need for your case there.
User Bob Arnson answered on Mar 25 '11:
See "Changing the UI sequence of a built-in dialog set" in the topic
"Customizing Built-in WixUI Dialog Sets" in WiX.chm.