xmluser-interfacewixwindows-installereula

Need to add EULA UI to this code, using WIX. I have tried many online blog, none seems to fit. I am using cmd with candle and light


I am going to add the initial part, since the code is really long with many component id references. I am completely new to anything related to this, so I am kinda stuck and headbanging on this. I want to move on.

    <?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:utilExt="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">

<Product Id="*" UpgradeCode="12345678-1234-1234-1234-111111111111" Name="Sameerto" Version="0.0.1" Manufacturer="Sameer" Language="1033">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Manufacturer="Sameer" />
    <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
    


    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLDIR" Name="Sameerho">
                <Component Id="ApplicationFiles" Guid="12345678-1234-1234-1234-222222222222">
                    <File Id="ApplicationFile1" Source="example.exe"/>
                </Component>

                <Component Id="cmpBB73983CF7E94ED14C76D99BF521C438" Guid="06A9BAB1-AF17-4D14-9318-2584A44F2D75">
                    <File Id="fil287E390545AF7AF698CCF1D63345736E" KeyPath="yes" Source="MySourceFiles\cleanup-dcvviewer.bat" />
                </Component>
                <Component Id="cmp874CCF5A122BDB83D7303BBC3F6929D9" Guid="51C5B07B-ADC9-4C2C-802C-2DB129ED0916">
                    <File Id="fil87D9664F704FABC70266239A88EA1D5A" KeyPath="yes" Source="MySourceFiles\README.txt" />
                </Component>
                <Component Id="cmp190EF23B12FD9F92F3E4D70FE500376C" Guid="7C61CCBA-0810-40B7-B813-4DDF07E8691C">
                    <File Id="filC8691AF57BFFAC9BD556CB015EFE92A0" KeyPath="yes" Source="MySourceFiles\setup-dcvviewer.bat" />
                </Component>
                <Directory Id="dir2C496578EAAEC9B7A90F298F78772FC8" Name="bin">
                    <Component Id="cmp8EEB04762C874D3F206ACA62ABBBCD1B" Guid="77F158AE-CD0E-4F01-9E89-40022A6D03A0">
                        <File Id="fil8E1E4C8F9D916A9719D62E6937094CC3" KeyPath="yes" Source="MySourceFiles\bin\dcvusblist.exe" />
                    </Component>
                    <Component Id="cmp6DFB4632AC8C9F75BB45E66F3A3E3CB4" Guid="B929F579-A86A-477F-BA59-89B538B418AC">
                        <File Id="fil046A23EF9C9AE19E3D1D2A141EC3C8DE" KeyPath="yes" Source="MySourceFiles\bin\dcvusblist.exe.config" />
                    </Component>
                    <Component Id="cmp3EE5EA309DCAE478196917A9438FFDCA" Guid="905C54E2-907C-4C67-8B0E-C8C137E65295">
                        <Class Id="{0304AC76-9382-3817-80A8-BF7390F05D1B}" Context="InprocServer32" Description="ViewerApp.LeftPart" ThreadingModel="both" ForeignServer="mscoree.dll">
                            <ProgId Id="ViewerApp.LeftPart" Description="ViewerApp.LeftPart" />
                        </Class>
                        <Class Id="{05ED9BF8-699B-3359-9BE9-5F024D0CBFBF}" Context="InprocServer32" Description="ViewerApp.FileSystemRedirectionStatusToBoolConverter" ThreadingModel="both" ForeignServer="mscoree.dll">
                            <ProgId Id="ViewerApp.FileSystemRedirectionStatusToBoolConverter" Description="ViewerApp.FileSystemRedirectionStatusToBoolConverter" />
                            ||
                            |
                            |
                            |continued......

Solution

  • WiX Tutorial: If you haven't done so already, please skim through the WiX tutorial: https://www.firegiant.com/wix/tutorial/

    WiX UI: There are several standard GUI sets for WiX. These dialog sets are described in the tutorial here. I find that WixUI_Mondo works best. They contain the most common dialogs needed in a setup. They can be customized in various ways: please skim this old answer for more on this. Directly relevant for you should be to customize the dialog set with a license file (that is from the WiX tutorial).

    Visual Studio: Here is an example of the most basic WiX setup with a GUI. It is a Visual Studio project. You should try to use Visual Studio if you can, much easier. Are you not allowed to in your environment? You can install the community edition for free: https://visualstudio.microsoft.com/

    There are various samples for WiX here: https://github.com/glytzhkof - they are very ad-hoc many of them, but they should compile with Visual Studio after you change a couple of GUIDs. Create GUIDs from the Visual Studio tools menu, or here (for example): https://www.guidgenerator.com/

    License Agreement: The essence of adding a license agreement is explained in this answer (towards bottom). Here is the essential code inlined:

    <UIRef Id="WixUI_Mondo" />
    <WixVariable Id="WixUILicenseRtf" Value="TestLicenseAgreement.rtf" />
    

    Link: