What does EndDialog do? - wix

I have a WIX installer and I am trying to work out what this line is actually doing (attached to the next button on my WIX dialog).
<Publish Event="EndDialog" Value="Return" >1</Publish>
It seems to me that this line means we are handing control back to the installer after showing our custom dialogs. But how does it then know which dialog to display next. It should in my case be showing the dialog indicating installation progress, but it jumps to the wrong dialog.
If I change it to this (ProgressDlg is the dialog showing installation progress in the WixUI_Minimal UI set which is the one I actually want to jump to),
<Publish Event="NewDialog" Value="ProgressDlg" >1</Publish>
It throws an error when I try to install

OK, I seem to have stumbled across something that now works, but I don't really understand why. Comments would be appreciated.
I have this dialog sequence,
WelcomeEulaDlg (part of WixUI_Minimal)
CustomInstall
StartAutomaticallyUI
IC3DatabaseSelection
GSDatabaseSelectionUI
ProgressDlg (part of WixUI_Minimal)
So basically I have created 4 dialogs that come between the EULA and installation progress dialog.
I had those dialogs inside an InstallUISequence block so that using orca would show those dialogs within the InstallUISequence table.
This seemed to be my issue. As soon as I removed the dialogs from the block and only had the first dialog in the block (which is CustomInstall) it worked fine.
Now it looks like this, whereas before that table had all the other dialogs
<InstallUISequence>
<Show Dialog="CustomInstall" After="WelcomeEulaDlg" >NOT Installed</Show>
</InstallUISequence>
The way I link those dialogs together and made them all included was just by linking the next and back buttons together. They didn't need to be in the InstallUISequence.
I got this idea from using the WixAware demo and creating a project in there.

Related

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 Installer: How to hide/remove the Welcome dialog in WixUI_InstallDir mode

I am trying to remove the WelcomeDlg from the built-in WixUI_InstallDir dialog set.
For creating the setup executable and adding prerequisites , I used the bootstrap application where in I bundles the created msi. Now the issue is the bootstrap comes with its own Welcome dialog and the embedded msi also shows its own dialog box. In order to get rid of the msi welcome dialog, I
have removed the Publish statemnts related to Welcome dlg from the custom WixUI_InstallDir.wxs. But I am not able to get hide the welcome dialog.
Is there any way to get rid of the msi welcome dialog ?
Recently I also faced similar kind of situation where I need to exclude showing WelcomeDlg. Our idea was to create a custom license agreement dialog as the first dialog of the UI.
In order to achieve that behavior, following changes have been made.
Created a new wxs dialog with id "AdvancedWelcomeEulaDlgEx" which shows the EULA, checkbox to accept and Next button.
In this dialog's InstallUISequence, added the following line.
<InstallUISequence>
<Show Dialog="AdvancedWelcomeEulaDlgEx" Before="ProgressDlg">NOT Installed</Show>
</InstallUISequence>
Suppress the WelcomeDlg from showing. We used an approach like below in main UI fragment (Condition ensures that it won't show in normal case; In our case Installed and Patch case never happens as it is the way it handled)
<InstallUISequence>
<Show Dialog="WelcomeDlg" Before="AdvancedWelcomeEulaDlgEx" >Installed AND PATCH</Show>
</InstallUISequence>
You can check out this link which explains a similar kind of approach.
Basically the idea is to suppress the Welcome dialog and use the next dialog or custom dialog as initial one. Also, the Publish events of Next and other dialog's events should be rewired accordingly.

Don't install if a program is running

I have a wix installer. How can I prevent the install if a program is running? I don't want to have the installer close the program. It may not be in a state where it is safe to close. I want to tell the user they need to close the application and either wait for the user to close it, or just exit the install.
I removed <DialogRef Id="MsiRMFilesInUse" /> and that appears to prevent the installer from prompting to close the application.
However, the default FileInUse dialog allows you to ignore the fact that files are in use. I tried to find a way to remove the ignore option but was unable to. The best option I could come up with was to remap the "Ignore" button to "Exit".
<Publish Dialog="FilesInUse" Control="Ignore" Event="EndDialog" Value="Exit">1</Publish>
I first tried to map "Ignore" to "Retry". That worked the first time the FilesInUse dialog appeared, but not after your retried once.
This is definitely a hack, but its the best option I've found so far.

wix disable repair from add remove programs but not from maintenacetypedialog

I am creating installer in wix.
I want to disable repair from Add Remove Programs, but not from MaintenanceTypDialog.
I have set ARPNOREPAIR to 1. Repair doesn't appear in ARP as expected, but the Repair button is also getting disabled in the Maintenance dialog.
Can anyone please help. I am new to wix.
The Maintenance dialog relies on the ARPNOREPAIR property value as well, that's why when you set this property, the repair option is disabled in both places.
First of all, you should think carefully whether you really want to disable repair in one place, and leave it as is in another one. If that's truly the case, you should modify the Maintenance dialog the way you'd like (for instance, change the condition which disables the Repair button) and inject this modified dialog into the UI sequence.
This might sound pretty scary for beginner, that's why I suggest you starting from the "Customizing Built-in WixUI Dialog Sets" article in WiX.chm file.
Or you can set ARPNOREPAIR in a CA after MaintenanceWelcomeDlg. It seems to work for me. For example,
<CustomAction Id="CA_Set_ARPNOREPAIR" Property="ARPNOREPAIR" Value="1" />
<InstallUISequence>
<Custom Action="CA_Set_ARPNOREPAIR" After='MaintenanceWelcomeDlg' />
</InstallUISequence>

wix ExitDialog Conditions

I have a Custom Action that launches an app from the ExitDialog Dialog, if the user ticks the check box that is. At any rate, my app has three features and the option to launch this app should only appear if one of the features has been installed.
I have the following code:
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="RCTPI" >
<![CDATA[LAUNCHUPONEXIT AND &WindowsService=3 AND NOT INSTALLED]]>
</Publish>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Config Tool" > </Property>
I would have expected that the &WindowsService=3 meant that only if the WindowsService feature was selected to be installed, would the condition be met. However it appears regardless of what features are selected to be installed.
Any ideas?
TIA
YM
I suppose that by the moment ExitDialog is displayed, the referenced feature is already installed. Hence, you should probably use install state syntax instead of install action, i.e. !WindowsService=3. Never tried it myself though...
I've actually ended up doing an old fashioned custom action, I've spent enough time as it is on this.
<Custom Action="RCTPI" Before="InstallFinalize"><![CDATA[&WindowsService=3 and NOT INSTALLED]]></Custom>