BrowseDialog and InstallDirDlg wix - wix

I have an InstallDirDLG and i need other browse dialog, the problem is when i select the path in second browse dialog also change the installdir path.
This is the control code:
<Control Id="IISLogDirectoryEdit" Type="PathEdit" X="45" Y="100" Width="220" Height="18" Disabled="yes" Property="IISLOGDIRECTORY" Indirect="yes" />
<Control Id="IIsLogDirectoryExplorer" Type="PushButton" X="267" Y="100" Width="56" Height="18" Text="Explorar..." />
And this is the publish:
<Publish Dialog="DirectoriesDlg" Control="Next" Event="SetTargetPath" Value="[IISLOGDIRECTORY]" Order="1">1</Publish>
<Publish Dialog="DirectoriesDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="2"><![CDATA[NOT IISLOGDIRECTORY]]></Publish>
<Publish Dialog="DirectoriesDlg" Control="Next" Event="NewDialog" Value="FtpDlg" Order="3">1</Publish>
<Publish Dialog="DirectoriesDlg" Control="IIsLogDirectoryExplorer" Property="_IISBrowseProperty" Value="[IISLOGDIRECTORY]" Order="1">1</Publish>
<Publish Dialog="DirectoriesDlg" Control="IIsLogDirectoryExplorer" Event="SpawnDialog" Value="IISBrowseDlg" Order="2">1</Publish>
Thanks.

Use different property name for the second browse dialog and set that property value to some default location.
For example:
<Control Id="TestPathEdit"
Type="PathEdit"
X="120" Y="157" Width="160" Height="18"
Property="TESTPROPERTY"/>
<Control Id="TestBrowse"
Type="PushButton"
X="290" Y="157" Width="56" Height="17"
Text="Browse">
<Publish Property="_BrowseProperty"
Value="TESTPROPERTY"
Order="1">1</Publish>
<Publish Event="SpawnDialog"
Value="BrowseDlg"
Order="2">1</Publish>
</Control>
and the default property value
<Property Id="TESTPROPERTY" Value="C:\Test"/>

Related

WiX: How to call UAC on "Repair"?

How can I show privilege escalation window on button "Repair"?
<Control Id="RepairButton" ElevationShield="yes" Type="PushButton" X="40" Y="118" Width="80" Height="17" ToolTip="!(loc.MaintenanceTypeDlgRepairButtonTooltip)" Text="!(loc.MaintenanceTypeDlgRepairButton)">
<Publish Event="Reinstall" Value="ALL" />
<Publish Property="WixUI_InstallMode" Value="Repair">1</Publish>
<Publish Property="TYPE_DESCRIPTION" Value="repair">1</Publish>
<Publish Property="TYPE_DESCRIPTION2" Value="repair">1</Publish>
</Control>

Wix custom dialog error 2856

I've a wix installation with a custom dialog added into the installation: ProgramDataInstallDlg
This is what my UI-tag look like for the whole project:
<UI Id="my_UI">
<UIRef Id="WixUI_FeatureTree" />
<DialogRef Id="ProgramDataInstallDlg" />
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ProgramDataInstallDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ProgramDataInstallDlg">1</Publish>
</UI>
Everything works fine if only next is pressed. But if back button is pressed in VerifyReadyDlg or next button in CustomizeDlg is pressed. I get error 2856.
This is what the installation log says:
DEBUG: Error 2856: Creating a second copy of the dialog ProgramDataInstallDlg
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2856. The arguments are: ProgramDataInstallDlg, ,
MSI (c) (E0:6C) [14:06:34:526]: Product: MOPS 4.0 -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2856. The arguments are: ProgramDataInstallDlg, ,
Whats wrong?
EDIT ProgramDataInstallDlg:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="ProgramDataInstallDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
<!--Banner UI-components-->
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Custom Setup" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="text" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<!--Content Components-->
<Control Id="NameLabel" Type="Text" X="45" Y="73" Width="220" Height="15" TabSkip="no" Text="text" />
<!--Bottom UI-components-->
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Back" Type="PushButton" X="173" Y="243" Width="56" Height="17" Text="Back">
<Publish Event="SpawnDialog" Value="CustomizeDlg">1</Publish>
</Control>
<Control Id="Next" Type="PushButton" X="230" Y="243" Width="56" Height="17" Default="yes" Text="Next">
<Publish Event="SpawnDialog" Value="VerifyReadyDlg">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
</Dialog>
</UI>
</Fragment>
</Wix>
If you are customizing the UI I suggest to create a custom WixUI_FeatureTree.
Take a look at the code below. I took the default template and used your dialog name in the appropriate places.
From your custom dialog remove the following lines:
<Publish Event="SpawnDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Event="SpawnDialog" Value="CustomizeDlg">1</Publish>
The main dialog:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="WixUI_FeatureTreeCustom">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="FeatureTree" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<DialogRef Id="ProgramDataInstallDlg" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">LicenseAccepted = "1"</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2">NOT Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ProgramDataInstallDlg">1</Publish>
<Publish Dialog="ProgramDataInstallDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="ProgramDataInstallDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ProgramDataInstallDlg" Order="1">NOT Installed OR WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>

WiX INSTALLDIR not set after editing it per hand (not per BrowseDialog)

i try to let the user set the INSTALLDIR per hand, but the value from the textfield is not transfered into the INSTALLDIR Variable.
When the user click on the browsebutton and select the target directory it works.
<Product>
...
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
...
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="HereIAm">
....
</Directory>
</Directory>
</Fragment>
<UI>
...
<Publish Dialog="CustInstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
....
</UI>
<UI>
<Dialog Id="CustInstallDirDlg" Width="370" Height="270" Title="!(loc.InstallDirDlg_Title)">
...
<Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="!(loc.InstallDirDlgFolderLabel)" />
<Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" />
<Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" />
</Dialog>
</UI>
But i have another field, where i can edit my text per hand.
<product>
<Property Id="WIXUI_XMLDATASTORE" Value="DATASTOREDIR" />
<CustomAction Id="SetDataStorePath"
Property="WIXUI_XMLDATASTORE"
Value="[DATASTOREDIR]"
Execute="immediate"
/>
<InstallExecuteSequence>
<Custom Action="SetDataStorePath"
Before="InstallInitialize"
/>
</product>
<UI Id="ServiceAccount">
<Dialog Id="ServiceAccountDlg" ...>
...
<Control Id="DataStoreLabel" Type="Text" X="20" Y="150" Width="290" Height="15" NoPrefix="yes"
Text="Please enter Datastore Location" />
<Control Id="CDataStore" Type="PathEdit" X="20" Y="165" Width="220" Height="18" Property="WIXUI_XMLDATASTORE" Indirect="yes"/>
<Control Id="ChangeFolderDS" Type="PushButton" X="250" Y="165" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" />
</Dialog>
</UI>
<UI>
<Publish Dialog="ServiceAccountDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
<Publish Dialog="ServiceAccountDlg" Control="Next" Event="NewDialog" Value="ISISIPSettingsDlg">1</Publish>
<Publish Dialog="ServiceAccountDlg" Control="ChangeFolderDS" Property="_BrowseProperty" Value="[WIXUI_XMLDATASTORE]" Order="1">1</Publish>
<Publish Dialog="ServiceAccountDlg" Control="ChangeFolderDS" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
</UI>
Thank you,
Kevin
Okay, found the error.
The following line was missing in the CustInstallDirDlg:
<Publish Dialog="CustInstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
now it looks like this:
<Publish Dialog="CustInstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="CustInstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>

Create new dialog with 4 checkboxes and add the dialog UI.wxs

How can I add a new dialog to the installation set of dialogs in WiX? Before the future selection dialog I want to pop up a dialog with 4 check boxes to add some extra files.
I have found some help on adding a checkbox to an existing dialog, but how can I add a new dialog?
I have tried this:
added the following inside in my UI.wxs
<Dialog Id="NewDlg" Width="370" Height="270" Title="Conditions dialog">
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="OP1" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPONE" Text="Op1" />
<Control Id="OP2" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPTWO" Text="Op2" />
<Control Id="OP2" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPTHREE" Text="Op3" />
<Control Id="OP2" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPFOUR" Text="Op4" />
</Dialog>
<Publish Dialog="NewDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg"></Publish>
<Publish Dialog="NewDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg"></Publish>
But the dialog in not popping up.
UPDATE: Now the dialog is showing up. But,
The checkbox is not allowing to uncheck and,
How to install a file based on the check box's check?
You should define next step in LicenseAgreementDlg for creating your dialog. Check the markup code below:
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="NewDlg" Order="1"></Publish>
<Publish Dialog="NewDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg"></Publish>
<Publish Dialog="NewDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg"></Publish>

WIX - Adding a custom Dialog having trouble with back/next buttons

I am working on creating a custom WixUi configuration, here is what I've done so far:
Copied the WixUI_Minimal.wxs file into my project and changed the Id to: WixUI_CustomMinimal
Copied the WelcomeEulaDlg.wxs file into my project and changed the Id to: CustomWelcomeEulaDlg
Copied the WelcomeDlg.wxs file into my project and changed the Id to: CustomWelcomeDlg
Added InstallTypeDlg.wxs to my project
Modified the CustomWelcomeEulaDlg to change the Install button to a next button.
Modified WixUI_CustomMinimal to make the Next/NextNoShield buttons on WelcomeEulaDlg open the InstallTypeDlg dialog
Added the InstallTypeDlg Dialog to the InstallUiSequence.
So now the problem: I am trying to setup a back button on InstallTypeDlg, this is working but after pressing the back button and then pressing the next button on CustomWelcomeEulaDlg InstallTypeDlg is skipped and it goes straight to installing.
Here are my files:
WixUI_CustomMinimal
<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="WixUI_Minimal.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<!--
First-time install dialog sequence:
- WixUI_WelcomeEulaDlg
Maintenance dialog sequence:
WixUI_MaintenanceWelcomeDlg
- WixUI_MaintenanceTypeDlg
- WixUI_VerifyReadyDlg
Patch dialog sequence:
- WixUI_WelcomeDlg
- WixUI_VerifyReadyDlg
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="WixUI_CustomMinimal">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="Minimal" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<DialogRef Id="CustomWelcomeDlg" />
<DialogRef Id="CustomWelcomeEulaDlg" />
<DialogRef Id="InstallTypeDlg" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<Publish Dialog="CustomWelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomWelcomeDlg" Order="2">Installed AND PATCH</Publish>
<Publish Dialog="CustomWelcomeEulaDlg" Control="Next" Event="NewDialog" Value="InstallTypeDlg">Installed AND PATCH</Publish>
<Publish Dialog="CustomWelcomeEulaDlg" Control="NextNoShield" Event="NewDialog" Value="InstallTypeDlg">Installed AND PATCH</Publish>
<Publish Dialog="InstallTypeDlg" Control="Back" Event="NewDialog" Value="CustomWelcomeEulaDlg" Order="2">Installed AND PATCH</Publish>
<InstallUISequence>
<Show Dialog="CustomWelcomeDlg" Before="CustomWelcomeEulaDlg">Installed AND PATCH</Show>
<Show Dialog="CustomWelcomeEulaDlg" Before="InstallTypeDlg">NOT Installed</Show>
<Show Dialog="InstallTypeDlg" Before="ProgressDlg">NOT Installed</Show>
</InstallUISequence>
<Property Id="ARPNOMODIFY" Value="1" />
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>
CustomWelcomeEulaDlg
<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="WelcomeEulaDlg.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="CustomWelcomeEulaDlg" Width="370" Height="270" Title="!(loc.WelcomeEulaDlg_Title)">
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeEulaDlgBitmap)" />
<Control Id="Title" Type="Text" X="130" Y="6" Width="225" Height="30" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeEulaDlgTitle)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="130" Y="207" Width="226" Height="18" CheckBoxValue="1" Property="LicenseAccepted" Text="!(loc.WelcomeEulaDlgLicenseAcceptedCheckBox)" />
<Control Id="Print" Type="PushButton" X="88" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Next" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
<Condition Action="show">ALLUSERS</Condition>
</Control>
<Control Id="NextNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Next" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
<Condition Action="show">NOT ALLUSERS</Condition>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="LicenseText" Type="ScrollableText" X="130" Y="36" Width="226" Height="162" Sunken="yes" TabSkip="no">
<Text SourceFile="!(wix.WixUILicenseRtf)" />
</Control>
</Dialog>
</UI>
<InstallUISequence>
<Show Dialog="CustomWelcomeEulaDlg" Before="ProgressDlg" Overridable="yes">NOT Installed</Show>
</InstallUISequence>
</Fragment>
</Wix>
InstallTypeDlg
<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="WelcomeEulaDlg.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Property Id="INSTALLTYPE" Value="Null"/>
<Dialog Id="InstallTypeDlg" Width="370" Height="270" Title="!(loc.WelcomeEulaDlg_Title)">
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeEulaDlgBitmap)" />
<Control Id="Title" Type="Text" X="130" Y="6" Width="225" Height="30" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeEulaDlgTitle)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Print" Type="PushButton" X="88" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Publish Event="AddLocal" Value="ServiceFeature"><![CDATA[INSTALLTYPE = "SERVICE"]]></Publish>
<Publish Event="Remove" Value="ServiceFeature"><![CDATA[INSTALLTYPE <> "SERVICE"]]></Publish>
<Condition Action="disable">INSTALLTYPE = "Null"</Condition>
<Condition Action="enable"><![CDATA[INSTALLTYPE <> "Null"]]></Condition>
<Condition Action="show">ALLUSERS</Condition>
</Control>
<Control Id="InstallNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Publish Event="AddLocal" Value="ServiceFeature"><![CDATA[INSTALLTYPE = "SERVICE"]]></Publish>
<Publish Event="Remove" Value="ServiceFeature"><![CDATA[INSTALLTYPE <> "SERVICE"]]></Publish>
<Condition Action="disable">INSTALLTYPE = "Null"</Condition>
<Condition Action="enable"><![CDATA[INSTALLTYPE <> "Null"]]></Condition>
<Condition Action="show">NOT ALLUSERS</Condition>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="FeatureGroup" Property="INSTALLTYPE" Type="RadioButtonGroup" Default="no" X="130" Y="36" Width="226" Height="162">
<RadioButtonGroup Property="INSTALLTYPE">
<RadioButton Text="Console" Height="17" Value="CONSOLE" Width="150" X="20" Y="0" />
<RadioButton Text="Windows Service" Height="17" Value="SERVICE" Width="150" X="20" Y="25" />
<RadioButton Value="Null" X="0" Y="0" Width="0" Height="0" Text="Null" />
</RadioButtonGroup>
</Control>
</Dialog>
</UI>
<InstallUISequence>
<Show Dialog="InstallTypeDlg" Before="ProgressDlg" Overridable="yes">NOT Installed</Show>
</InstallUISequence>
</Fragment>
</Wix>
The first problem is in the InstallUISequence. You should use:
<Show Dialog="CustomWelcomeDlg" Before="CustomWelcomeEulaDlg">
Installed AND PATCH
</Show>
<Show Dialog="CustomWelcomeEulaDlg" Before="ProgressDlg">
NOT Installed
</Show>
In the CustomWelcomeEulaDlg, the Back and Next buttons should be like this:
<Control Id="Back" Type="PushButton" X="156" Y="243"
Width="56" Height="17" Disabled="yes" Text="Back" />
<Control Id="Next" Type="PushButton" ElevationShield="yes"
X="212" Y="243" Width="80" Height="17" Default="yes"
Text="Next" Hidden="yes">
<Publish Event="NewDialog" Value="InstallTypeDlg">1</Publish>
</Control>
And in the InstallTypeDlg, the Back and Install buttons should be similar to this:
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56"
Height="17" Disabled="yes" Text="Back">
<Publish Event="NewDialog" Value="CustomWelcomeEulaDlg">1</Publish>
</Control>
<Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243"
Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
<Publish Event="EndDialog" Value="Return" />
</Control>