[wix-users] Help - welcome dialog appearing again as the final step

Uvin Withana uvin.work at gmail.com
Fri Aug 5 05:40:07 PDT 2016


Hi, to give you all some background, I followed a tutorial found here: (
http://www.egoroff.spb.ru/blog/62003.html) to make my installer not ask for
admin rights for per user installations. All that worked fine and my setup
looked like the typical, most basic, Wix_advanced setup.

Now what I wanted to do was to remove the 'Advance' button from the setup
and include those models (InstallScope, InstallDirectory, Features) into
the default flow of the installer. Meaning there would now be no simple
installation option, instead when the user accepts the license agreement
checkbox and clicks 'Next' the next dialog would be the 'InstallScope'
dialog. I wanted to hide the 'Advanced' button as well.

So what I did was create 2 new models (one was a new welcome screen and the
second was the new license screen without the 'Advance' button).
I then tried to call the 2 models in sequence in the `InstallUISequence`
tag. However, I keep getting an error saying that my new dialog can't be
found. Both of them can be found however, when I call either one before
`AdvancedWelcomeEulaDlg` (which is the default welcome screen).

So at my current stage my problem is that the installer loads fine and
flows through perfectly until the user comes to the 'Features' screen and
finally clicks install. Now instead of installing my application, the setup
loads up 'AdvancedWelcomeEulaDlg'. Now if I accept the license checkbox and
hit install ('Advance' button is not clickable here for some reason), the
application will install immediately using the previous configurations. I
cannot understand what is happening.

Finally, if I open up my installer using Orca and delete the row
`AdvancedWelcomeEulaDlg`, my installer will work PERFECTLY as expected.

Below your can find my entire Product.wxs file. It's pretty basic and
should hopefully make sense to you all. Any advice is appreciated. Thanks.


---------------------------------------------------------------


<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="89FA2DF8-51A5-4858-B613-65F031D75463" Name="RemoteRunner"
Language="1033" Version="1.0.0.0" Manufacturer="AwesomeCompany"
UpgradeCode="641a53e3-d9bb-49a4-9aed-1c58fdd573a6">
<Package InstallerVersion="200" Compressed="yes"  />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
<MediaTemplate />

<Feature Id="ProductFeature" Title="RemoteRunner" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>

    <!--<UIRef Id="WixUI_Advanced" />-->
    <!--<UIRef Id="WixUI_InstallScope" />-->
    <Property Id="ApplicationFolderName" Value="RemoteRunner" />
    <Property Id="WixAppFolder" Value="WixPerUserFolder" />

    <WixVariable Id="WixUIBannerBmp" Value="Banner.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="Dialog.bmp" />
    <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />

    <UIRef Id="WixUI_MySetup" />
    <Property Id="ALLUSERS" Secure="yes" Value="2" />
    <Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1" />


</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="LocalAppDataFolder" Name='AppData'>
<Directory Id="APPLICATIONFOLDER" Name="RemoteRunner" />
</Directory>
</Directory>
</Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER">
      <Component Id="datafile" Guid="*">
        <File Id="datafile.txt" Source="datafile.txt" KeyPath="yes"
Checksum="yes"/>
      </Component>
</ComponentGroup>
</Fragment>



  <Fragment>
    <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" />
    <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" />

    <PropertyRef Id="ApplicationFolderName" />

    <CustomAction
        Id="MyWixSetDefaultPerUserFolder"
        Property="WixPerUserFolder"
        Value="[LocalAppDataFolder]Apps\[ApplicationFolderName]"
        Execute="immediate" />
    <CustomAction
        Id="MyWixSetDefaultPerMachineFolder"
        Property="WixPerMachineFolder"
        Value="[ProgramFilesFolder][ApplicationFolderName]"
        Execute="immediate" />
    <CustomAction
        Id="MyWixSetPerUserFolder"
        Property="APPLICATIONFOLDER"
        Value="[WixPerUserFolder]"
        Execute="immediate" />
    <CustomAction
        Id="MyWixSetPerMachineFolder"
        Property="APPLICATIONFOLDER"
        Value="[WixPerMachineFolder]"
        Execute="immediate" />

    <InstallExecuteSequence>
      <Custom Action="MyWixSetDefaultPerUserFolder" Before="CostFinalize" />
      <Custom Action="MyWixSetDefaultPerMachineFolder"
After="MyWixSetDefaultPerUserFolder" />
      <Custom Action="MyWixSetPerUserFolder"
After="MyWixSetDefaultPerMachineFolder">
        ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR
(ALLUSERS=2 AND (NOT Privileged)))
      </Custom>
      <Custom Action="MyWixSetPerMachineFolder"
After="MyWixSetPerUserFolder">
        ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR
(ALLUSERS=2 AND Privileged))
      </Custom>
    </InstallExecuteSequence>
    <InstallUISequence>
      <Custom Action="MyWixSetDefaultPerUserFolder" Before="CostFinalize" />
      <Custom Action="MyWixSetDefaultPerMachineFolder"
After="MyWixSetDefaultPerUserFolder" />
      <Custom Action="MyWixSetPerUserFolder"
After="MyWixSetDefaultPerMachineFolder">
        ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR
(ALLUSERS=2 AND (NOT Privileged)))
      </Custom>
      <Custom Action="MyWixSetPerMachineFolder"
After="MyWixSetPerUserFolder">
        ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR
(ALLUSERS=2 AND Privileged))
      </Custom>
    </InstallUISequence>

    <UI Id="WixUI_MySetup">
      <TextStyle
          Id="WixUI_Font_Normal"
          FaceName="!(loc.Advanced_Font_FaceName)"
          Size="!(loc.Advanced_Font_Normal_Size)" />
      <TextStyle
          Id="WixUI_Font_Bigger"
          FaceName="!(loc.Advanced_Font_FaceName)"
          Size="!(loc.Advanced_Font_Bigger_Size)" />
      <TextStyle
          Id="WixUI_Font_Title"
          FaceName="!(loc.Advanced_Font_FaceName)"
          Size="!(loc.Advanced_Font_Title_Size)" Bold="yes" />
      <TextStyle
          Id="WixUI_Font_Emphasized"
          FaceName="!(loc.Advanced_Font_FaceName)"
          Size="!(loc.Advanced_Font_Emphasized_Size)"
          Bold="yes" />

      <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
      <Property Id="WixUI_Mode" Value="Advanced" />

      <DialogRef Id="BrowseDlg" />
      <DialogRef Id="DiskCostDlg" />
      <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="WelcomeDlg"/>

      <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog"
Value="Return" Order="999">1</Publish>

      <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction"
Value="WixUIValidatePath" Order="1">1</Publish>
      <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog"
Value="InvalidDirDlg" Order="2">
        WIXUI_INSTALLDIR_VALID<>"1"
      </Publish>

      <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced"
Event="NewDialog" Value="InstallScopeDlg" Order="1">
        !(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser)
      </Publish>
      <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced"
Event="NewDialog" Value="FeaturesDlg" Order="2">
        NOT !(wix.WixUISupportPerMachine)
      </Publish>
      <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced"
Event="NewDialog" Value="InstallDirDlg" Order="3">
        !(wix.WixUISupportPerMachine) AND NOT !(wix.WixUISupportPerUser)
      </Publish>

      <Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog"
Value="AdvancedWelcomeEulaDlg">1</Publish>
      <!-- override default WixAppFolder of WixPerMachineFolder as standard
user won't be shown the radio group to set WixAppFolder -->
      <Publish Dialog="InstallScopeDlg" Control="Next"
Property="WixAppFolder" Value="WixPerUserFolder" Order="1">
        !(wix.WixUISupportPerUser) AND NOT Privileged
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next"
Property="MSIINSTALLPERUSER" Value="1" Order="3">
        WixAppFolder = "WixPerUserFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next"
Property="MSIINSTALLPERUSER" Value="{}" Order="2">
        WixAppFolder = "WixPerMachineFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next" Event="DoAction"
Value="MyWixSetDefaultPerMachineFolder" Order="3">
        WixAppFolder = "WixPerMachineFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next" Event="DoAction"
Value="MyWixSetDefaultPerUserFolder" Order="3">
        WixAppFolder = "WixPerUserFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next"
Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Order="4">
        WixAppFolder = "WixPerUserFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next"
Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Order="5">
        WixAppFolder = "WixPerMachineFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog"
Value="FeaturesDlg" Order="6">
        WixAppFolder = "WixPerUserFolder"
      </Publish>
      <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog"
Value="InstallDirDlg" Order="7">
        WixAppFolder = "WixPerMachineFolder"
      </Publish>

      <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog"
Value="InstallScopeDlg">
        !(wix.WixUISupportPerUser)
      </Publish>
      <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog"
Value="AdvancedWelcomeEulaDlg">
        NOT !(wix.WixUISupportPerUser)
      </Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath"
Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction"
Value="WixUIValidatePath" Order="2">
        NOT WIXUI_DONTVALIDATEPATH
      </Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog"
Value="InvalidDirDlg" Order="3">
        NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"
      </Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog"
Value="FeaturesDlg" Order="4">
        WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"
      </Publish>
      <Publish
          Dialog="InstallDirDlg"
          Control="ChangeFolder"
          Property="_BrowseProperty"
          Value="[WIXUI_INSTALLDIR]"
          Order="1">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="ChangeFolder"
Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>

      <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog"
Value="InstallScopeDlg">
        NOT Installed AND WixAppFolder = "WixPerUserFolder"
      </Publish>
      <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog"
Value="InstallDirDlg">
        NOT Installed AND WixAppFolder = "WixPerMachineFolder"
      </Publish>
      <Publish
          Dialog="FeaturesDlg"
          Control="Back"
          Event="NewDialog" Value="MaintenanceTypeDlg">Installed</Publish>

      <Publish Dialog="MaintenanceWelcomeDlg" Control="Next"
Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

      <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton"
Event="NewDialog" Value="FeaturesDlg">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="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="WelcomeDlg" Control="Next" Event="NewDialog"
Value="VerifyReadyDlg">
        Installed AND PATCH
      </Publish>
    </UI>

    <InstallUISequence>
      <Show Dialog="WelcomeDlg" Before="AdvancedWelcomeEulaDlg" >Installed
AND PATCH</Show>
      <!--  <Show Dialog="UserRegistrationDlg"
Before="AdvancedWelcomeEulaDlg" >Installed AND PATCH</Show> -->
      <Show Dialog="CustomMagicWelcomeDlg"
Before="AdvancedWelcomeEulaDlg">NOT Installed</Show>
    </InstallUISequence>

    <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
    <UIRef Id="WixUI_Common" />
  </Fragment>


  <Fragment>
    <UI>
      <Dialog Id="CustomMagicWelcomeDlg" Width="370" Height="270"
Title="!(loc.WelcomeDlg_Title)">
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)" >
          <Publish Event="NewDialog"
Value="CustomMagicAdvancedWelcomeEulaDlg">1</Publish>
        </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="Bitmap" Type="Bitmap" X="0" Y="0" Width="370"
Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
Height="0" />
        <Control Id="Description" Type="Text" X="135" Y="80" Width="220"
Height="60" Transparent="yes" NoPrefix="yes"
Text="!(loc.WelcomeDlgDescription)" >
          <Condition Action="show">NOT Installed OR NOT PATCH</Condition>
          <Condition Action="hide">Installed AND PATCH</Condition>
        </Control>
        <Control Id="PatchDescription" Type="Text" X="135" Y="80"
Width="220" Height="60" Transparent="yes" NoPrefix="yes"
Text="!(loc.WelcomeUpdateDlgDescriptionUpdate)" >
          <Condition Action="show">Installed AND PATCH</Condition>
          <Condition Action="hide">NOT Installed OR NOT PATCH</Condition>
        </Control>
        <Control Id="Title" Type="Text" X="135" Y="20" Width="220"
Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)"
/>
      </Dialog>


      <Dialog Id="CustomMagicAdvancedWelcomeEulaDlg" Width="370"
Height="270" Title="!(loc.AdvancedWelcomeEulaDlg_Title)">
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370"
Height="44" TabSkip="no" Text="!(loc.AdvancedWelcomeEulaDlgBannerBitmap)" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
Height="0" />
        <Control Id="Title" Type="Text" X="20" Y="10" Width="300"
Height="24" Transparent="yes" NoPrefix="yes"
Text="!(loc.AdvancedWelcomeEulaDlgTitle)" />
        <Control Id="DescriptionPerMachine" Type="Text" X="20" Y="202"
Width="330" Height="31" Transparent="yes" NoPrefix="yes" Hidden="yes"
Text="!(loc.AdvancedWelcomeEulaDlgDescriptionPerMachine)">
          <Condition Action="show">ALLUSERS</Condition>
        </Control>
        <Control Id="DescriptionPerUser" Type="Text" X="20" Y="202"
Width="330" Height="31" Transparent="yes" NoPrefix="yes" Hidden="yes"
Text="!(loc.AdvancedWelcomeEulaDlgDescriptionPerUser)">
          <Condition Action="show">NOT ALLUSERS</Condition>
        </Control>
        <Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20"
Y="180" Width="226" Height="18" CheckBoxValue="1"
Property="LicenseAccepted1"
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="Install" Type="PushButton" X="212" Y="243" Width="80"
Height="17" Default="yes" Text="!(loc.AdvancedWelcomeEulaDlgInstall)">
          <Publish Event="NewDialog" Value="InstallScopeDlg">1</Publish>
          <Condition Action="disable"><![CDATA[LicenseAccepted1 <>
"1"]]></Condition>
          <!-- extra below-->
          <Publish Property="LicenseAccepted" Value="1">LicenseAccepted1 =
"1"</Publish>
          <Condition Action="enable">LicenseAccepted1 = "1"</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="20" Y="55"
Width="330" Height="121" Sunken="yes" TabSkip="no">
          <Text SourceFile="!(wix.WixUILicenseRtf)" />
        </Control>
      </Dialog>


    </UI>
  </Fragment>

</Wix>


More information about the wix-users mailing list