WiX print EULA works incorrectly RRS feed

  • Question

  • Hi. I have a WiX installer v3.11. I created a simple CustomDialog with print button and i have a regular WelcomeEulaDlg with print button. My custom window is showing before Eula. When I press print button on WelcomeEulaDlg it somehow takes my custom dialog file. And I dont know why... Heres my code:

        <MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" Schedule="afterInstallExecute"/>
        <MediaTemplate EmbedCab="yes"/>
        <Feature Id="ProductFeature" Title="MyInstaller" Level="1">
          <ComponentGroupRef Id="ProductComponents" />
        <Binary Id="bgPic" SourceFile="$(var.SolutionDir)\Side.bmp"/>
        <WixVariable Id="WixUIDialogBmp" Value="$(var.SolutionDir)\Side.bmp"/>
        <WixVariable Id="WixUIBannerBmp" Value="$(var.SolutionDir)\Thin.bmp"/>
        <WixVariable Id="WixUILicenseRtf" Value="$(var.SolutionDir)\EULA.rtf"/>
        <PropertyRef Id="NETFRAMEWORK45" />
        <Condition Message="This application requires .NET Framework 4.7.2. Please install the .NET Framework then run this installer again.">
          <![CDATA[Installed OR (NETFRAMEWORK45 >= "#461808")]]>
        <Condition Message='&lt;Error Message&gt;'><![CDATA[Privileged]]></Condition>
        <Icon Id='_FE1A01738764' SourceFile='app.ico' />
        <Icon Id="icon.ico" SourceFile="$(var.SolutionDir)app.ico"/>
        <Property Id="ARPPRODUCTICON" Value="icon.ico" />
        <UI Id="UserInterface">
          <Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
          <Property Id="WixUI_Mode" Value="Custom" />
          <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
          <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
          <TextStyle Id="WixUI_Font_Title"  FaceName="Tahoma" Size="9" Bold="yes" />
          <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
          <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LoggingInfoDialog">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="2">Installed AND PATCH</Publish>
          <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
          <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="VerifyReadyDlg">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>
          <DialogRef Id="ProgressDlg" />
          <DialogRef Id="ErrorDlg" />
          <DialogRef Id="FilesInUse" />
          <DialogRef Id="FatalError" />
          <DialogRef Id="UserExit" />
          <Publish Dialog="WelcomeEulaDlg" Control="Back" Event="EndDialog" Value="Return">1</Publish>
          <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" >2</Publish>
          <Publish Dialog="ProgressDlg" Control="Next" Event="EndDialog" Value="Return" ></Publish>
          <Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" ></Publish>
        <UIRef Id="WixUI_Common" />

    My custom dialog code:

        <CustomAction Id="PrintEula" BinaryKey="WixUIWixca" DllEntry="PrintEula" Return="ignore" Execute="immediate" />
        <UI Id="LoggingInfoDlg">
          <Dialog Id="LoggingInfoDialog" Width="370" Height="270" Title="MyInstaller">
            <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="{\WixUI_Font_Title}Information on processing personal data" />
              <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
            <Control Id="Print" Type="PushButton" X="180" Y="243" Width="56" Height="17" TabSkip="yes" Text="!(loc.WixUIPrint)">
                <Publish Event="DoAction" Value="PrintEula">1</Publish>
            <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" TabSkip="no" Default="yes" Text="Next">
              <Publish Event="NewDialog" Value="WelcomeEulaDlg">1</Publish>
            <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 Id="LicenseText" Type="ScrollableText" X="130" Y="55" Width="225" Height="150" TabSkip="no" Sunken="yes">
              <Text SourceFile="$(var.SolutionDir)\GDPR.rtf" />

    So my variable WixUILicenseRtf is set to EULA.rtf and the scrollable text is showing fine. but some How when I press print button It prints GDPR.rtf file instead of EULA.rtf. What I'm doing wrong?

    Wednesday, July 15, 2020 8:46 AM

All replies

  • Hi Juliavicius,
    This forum is discussing and asking questions about the Windows Forms such as Winforms controls, libraries, samples, publication and installation.
    Based on your description, it is mostly related to WiX. So it is recommended to ask the questions in Wix forum and you can get more professional answer.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 16, 2020 1:23 AM