Changing background bitmap in Wix ExitDialog - wix

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" />

Related

How to create a bootstrapper with a log window

Currently I'm using the standard WixStandardBootstrapperApplication.HyperlinkLicense bootstrapper theme.
This theme doesn't show much information during installation. I was wondering if there is a theme that shows the log output of each installer it executes. Maybe after clicking an advanced button. I've seen this in a few installers but of course I do not know for sure if these were made with Wix.
I've tried inspecting the existing themes with ThmViewer.exe but unfortunately this program either crashes, or displays no preview window.
I've found a reference to something called the ExecuteProgressActionDataText here
<Text Name="ExecuteProgressActionDataText" X="11" Y="163" Width="-11" Height="17" FontId="3" DisablePrefix="yes" />
But unfortunately I cannot get my bootstrapper to launch if I use the supplied theme file. I think I need a complete theme file, but I'm not sure where to find the original one for the WixStandardBootstrapperApplication.HyperlinkLince theme.
Any thoughts on how to create a bootstrapper with a log window?
Update:
I've found the original xml of the HyperLink theme here. Using that I've added the ExecuteProgressActionDataText element to my UI. Its a single label that displays a lot of events. But unfortunately its not a listbox or something like that which makes it quite useless. (There are way too many messages per second to make sense of them in a single label).
The theme file seems to be driven by WixStandardBootstrapperApplication.cpp and unfortunately I do not see any other variables defined there that have a name that indicates that they do what I want :(.
You have to modify the bootstrapperapplication.cpp to implement the listview yourself. You can add the view in the wix theme I believe but you would have to alter OnExecuteMsiMessage so that instead of using ThemeSetTextControl(....) you have to add a new list item to the listview. You should be able to do anything you want in the bootstrapper application with regards to the UI just need to figure out how

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:

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.

Wix: User Interface WixUI_FeatureTree add control to Welcome Dialog

I'm using WiX installer and WixUI_FeatureTree UI. I want to customize the Welcome Dialog window by adding one more text control. How can I do that? I search the documentation and didn't find anything
I that is not possible then can I change the height of the "Description" control? I tried like this but the Height was not changed?
<UI>
<Publish Dialog="WelcomeDlg" Control="Description" Property="Height" Value="150"></Publish>
</UI>
Adding a new control would require replacing the entire dialog and re-wiring the UI sequences to get your dialog to show up instead. You can read about that here: Customizing Built-in WixUI Dialog Sets.
If you just want to extend the contents of a control, WiX v3.6 has a new feature that allows .wxl files to not only change the text of a control but to change it's coordinates as well. Bob Arnson has a good article on that here: Localizing more than strings in WiX v3.6.

Wix Custom Dialog

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>