ErrorDlg with hyperlink - wix

In the installer I'm building, the user must have a minimum of .NET 4.6.1 If they don't, I cancel the installation.
<PropertyRef Id="WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED" />
<Condition Message="This requires .NET Framework 4.6.1 or higher.">
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED]]>
</Condition>
I want to add a hyperlink button to the .NET 4.6.1 download page from this error dialog. I can't figure out how to override the ErrorDlg and cannot simply add a new dialog because this page isn't part of the UI sequence.

This resource can give you a good idea of how to override ErrorDlg (search for installer uses the Error dialog on that page). Basically, here is the main quote:
Create a new source file and call it ErrorDlg.wxs. This file should
set a property called ErrorDialog to the value you've set the Dialog
element's Id. In addition, the Dialog element should set the
ErrorDialog attribute to yes.
There are also example snippets down in the text. As soon as you manage to create a custom dialog like this and inject it into the sequence correctly, inserting a new control should be quite trivial.

Related

Wix Installer - Customize MsiRMFilesInUse dialog box

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

How can i add a button to wix installer finish dialog box

I am currently using WixUI_Minimal dialog set, So, just like optional text (CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT) can we add a button to the finish or exit dialog box on success scenario? I want to open a pdf file on the button click action.
Below is the code of how i am adding a custom text on finish dialog:
<UIRef Id="WixUI_Minimal" />
<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" Property="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Thank you for installing [ProductName]."/>
<InstallUISequence>
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" After="FindRelatedProducts">NOT Installed</Custom>
</InstallUISequence>
You can have a look at this sample: https://github.com/glytzhkof/WiXOpenLogFile
It will show a check box that you can use to open the MSI log file. The MsiLogging property defined in the source file means that the log file will always be created. If you remove it the check box in the last dialog will be hidden (unless the log is still created by policy).
Here are a couple of other samples:
Custom Dialog Basics: https://github.com/glytzhkof/WiXCustomDialog - this sample shows the basic of customizing WiX dialogs. You base yourself off an existing WiX default dialog set and then extend it as necessary. This sample is very basic.
Experimental Dialog: https://github.com/glytzhkof/WiXViewLogExperiment - this little experiment uses a spawned dialog to show "something" at the end of the setup. Not too successful, but at least functional for testing and further experimentation. It is essentially an effort to prevent the update problems of normal MSI dialogs.
Links:
On WiX dialogs and MSI GUI
Injecting dialogs in WiX dialog sets

WiX - How to define only Feature tree UI

I've used the WixUI_FeatureTree dialog set but what I really need is a UI with the feature selection dialog, nothing else. WixUI dialog library contains the CustomizeDlg dialog which I understand to be the feature selection. I can't find any docs on using a single library dialog. Tried copying WixUI_FeatureTree.wxs fragment to my WXS and modifying it but I'm missing declaration or references (The Windows Installer XML variable !(wix.WixUICostingPopupOptOut) is unknown.). I'm using WiX v3.7 over VS2010.
Try to add the line
<UIRef Id="WixUI_Common" />
to the product element (best after </UI> ). this shold solve the ... variable ... is unknown error. then try to follow the "Changing the UI sequence of a built-in dialog set" example of this page: http://wix.sourceforge.net/manual-wix3/WixUI_customizations.htm

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 Localization

I have localized all the strings which I added in the project.
But a "Cancel" button in Error dialog in Wix which comes while uninstall is not localized.
Its showing in English. The text in the dialog is localized.This dialog is default wix dialog.
I have added WixUI_ErrorProgressText library in wxs file.
got a solution..
by changing Edit Summary Information of msi and change Languages to corresponding language code.
Do this using any patch or programming language like vc++ etc.