Wix Installer - Customize MsiRMFilesInUse dialog box - wix

I was trying to change the default MsiRMFilesInUse dialog box provided by restart manager used in wix toolset. Basically I want to localize the default message in the dialog box since it is not getting localized by windows.
I found this answer (https://stackoverflow.com/a/46462452/14162315) which explains the steps of making the custom dialog box instead of normal one. A custom dialog box could help me in localizing the message.
I tried the above steps but I am getting the error - Duplicate symbol 'Property:WixUIRMOption' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.
I thought that I have to change the property id of WixUIRMOption also to some custom value to mitigate the error, so I changed it to Custom_WixUIRMOption. It compiled successfully after this change but the dialog box is not coming at all after this change.
link to source code of default MsiRMFilesInUse.wxs - https://github.com/AnalogJ/Wix3.6Toolset/blob/master/RC0-source/wix36-sources/src/ext/UIExtension/wixlib/MsiRMFilesInUse.wxs

you should be fine if you provide a localization for MsiRMFilesInUseText.
<String Id="MsiRMFilesInUseText" Overridable="yes">Translated text</String>
See how the dialog is implemented:
https://github.com/wixtoolset/wix3/blob/develop/src/ext/UIExtension/wixlib/MsiRMFilesInUse.wxs
See how wix ui is translated:
https://github.com/wixtoolset/wix3/blob/develop/src/ext/UIExtension/wixlib/WixUI_en-us.wxl

Related

Attempt to install earlier version of the installed application causes error

I have created a custom UI and provided the standard dialog boxes as required to avoid ICE20 errors. I have included the following line as required:
If I use a WIX UI this works fine. But now I've created my own custom UI I get an "unexpected error" message with error code 2814 and then one with 2869. Does anyone know how to catch the attempted downgrade to produce a dialog box with the correct message?
I am not an MSI dialog expert, but there are a few things I can point out:
You can customize the internal GUI built into an MSI.
You can also make your own GUI for Burn setup.exe launchers.
Burn GUIs can be more modern than the rather ancient MSI GUI.
A Burn launcher can hide the built-in MSI GUI during installation.
I am not sure what GUI you have customized?
Error 2814: The error code 2814: "On the dialog [2] the control [3] names a nonexistent control [4] as the next control." - this seems to indicate that a control on your dialog points to a non-existent control as the next one to go to for the TAB order of the dialog. You need to point to a valid control that exists and it should be visible too.
Custom MSI GUI: Making your own MSI GUI is rarely advisable unless you need something very specific and unusual. You can use existing dialog sets and just inject a new dialog (which might be what you have done). Due to the lack of flexibility for MSI dialogs I would recommend that you make a Burn setup.exe GUI if you really need a lot of flexibility. I have not looked at this a great deal.
WiX MSI Dialog Sample: There is a sample, modified WiX MSI dialog set here: https://github.com/glytzhkof/WiXCustomDialog
Links: I have a few links on MSI dialogs and Burn GUI. This is quite overlapping, please just skim and see what makes sense to you:
WIX Installer with modern look and feel
Changing text color to Wix dialogs
Wix default folder dialog
Removing Default dialogs from MSI
Other Links:
A very clever effort from Stefan Kruger to work around the MSI GUI dialog limitations: http://www.installsite.org/pages/en/msi/articles/MultiListBox/index.htm
Dynamically changing RTF content in the EndDialog after success
https://github.com/frederiksen/Classic-WiX-Burn-Theme
How to add image background to custom MSI dialog?

WiX Toolset - Alt Text to the CancelDlg's Icon

I'm trying to make my app accessible (based on WCAG 2.1 guidelines).
I discovered that the default CancelDlg of WiX Toolset, which is the confirmation dialog that pops when the user tries to cancel the installation, is not accessible.
There is a yellow warning icon beside the text, but it has no Alt text or Name.
That makes narrators say "Image" instead of something along the line of "Warning icon" and confuse who is blind.
I didn't find a way to add an Alt text to that dialog that not include creating a custom dialog (which doesn't feel like the right way).
P.S. Using WiX version 3.10.
Any ideas?
Thanks!

Auto select License Agreement checkbox (or hide it)

I made an installer using wix burn.
I used the standard bootstrapper with Hyperlink license theme.
I don't want to display the EULA checkbox on upgrades. Once accepted one time, I don't want to show it again, or at least auto select it.
To achieve that, I customized the bafunctions.dll and wrote some code in OnDetect(). After a given condition is match, I set the variable EulaAcceptCheckbox = 1. I know that this is the variable name corresponding to the EULA checkbox because I inspected the log of the installer before making this changes.
After making all the modifications, I know my logic is working because I see the following lines in the log:
[1510:1410][2015-11-17T19:01:04]i000: Running detect complete BA function
[1510:1410][2015-11-17T19:01:04]i000: Setting numeric variable 'EulaAcceptCheckbox' to value 1
But the checkbox is not displayed as checked. I tried to set 'EulaAcceptCheckbox' in OnDetect() and also in OnDetectComplete(): no luck.
I also tried to set LicenseUrl="" and WixStdbaLicenseUrl="" but that does not work either.
I have already used bafunctions.dll to do some checkbox customization in another installer. It seems not to work with the EULA checkbox only. What's wrong with my approach?
There seems to be no solution for this.

FilesInUse cannot be modified and CloseApplications does nothing

I've googled this to death and cannot find a solution that works.
We need to prevent the user from re-installing our app while it's still running. The standard FilesInUse dialog works but it still allows the user to continue while the app is running and we dont want to force them to reboot - ie, they have to shutdown the app manually.
We tried to create a custom FilesInUse dialog:
We include the FilesInUse source and remove the Ignore option
Rename the ID of the dialog
Change the DialogRef in the Mondo UI
Add an suppress for ICE20 because it complains the FilesInUse doesnt exist if we dont do this.
The new dialoag is never used.
If I leave the id of FileInUse unmodified then I get an error about a duplicate dialog.
Ive also tried using utils:CloseApplications but this never does anything.
So: What is the current thinking on how to do this?
Thanks
PS, I love Wix but it does frustrate me at times :) Much like the wife...
Looking to achieve the same thing, I discovered the answer in the related question: Including modified FilesInUse dialog in WIX project.
Remove the DialogRef entry of FilesInUse from the UI file, and replace it with the custom Dialog for FilesInUse directly in the UI file.

How can I get more text onto the WelcomeDlg?

I've got some verbose text that's being truncated on my WelcomeDlg:
Clearly there's loads of room in the dialog for the extra lines of text, but the text box is too small. How can I make it larger?
You can take a look at the source for the WelcomeDlg to see what is happening. The text you are displaying is the <Control Id="Description" .... />, but you'll notice there is also another text field below it for describing a patch if it is being applied.
You can customize the WelcomeDlg by following the instructions in the last couple of section of this page in the manual. Here are some quick steps:
Copy the fragment for the WelcomeDlg into your own project from the Wix sources.
Change the Id attribute of the Dialog tag to be unique. You can then make any changes to the dialog you need (such as making the patch description field smaller and the description field taller).
Copy the fragment that defines your UI sequence from the Wix sources into your project. If you were using the WixUI_InstallDir sequence you would copy this file.
In your custom dialog sequence file you need to change the Id attribute of the UI tag to be unique and any references to WelcomeDlg to the Id you put on your custom WelcomeDlg.
In your main package change your <UIRef Id="..." /> tag to reference the custom dialog sequence.
Not to dismiss your requirement outright, but I would keep in mind that the attention span of a user running an installer is about that of a 2 year old. They likely won't read whatever you are putting there in the first place. Same goes for that EULA that management always wants to make sure the user scrolled all the way through before being allowed to click I Accept.
I follow a minimalist approach when creating installer UI. Next, Next (if needed), Install, Finish. Still don't quite like the Install Finish pattern but some do.