Reputation: 4932
I need a WiX 3 script to display to display only 2 dialogs: Welcome & Completed. Thats it no need for EULA, folder selection etc. All help appreciated.
Upvotes: 28
Views: 13777
Reputation: 1117
Answer posted by @CheGueVerra updated for WiX 4
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?foreach WIXUIARCH in X86;X64;A64 ?>
<Fragment>
<UI Id="MinimalUI_$(WIXUIARCH)">
</UI>
<UIRef Id="MinimalUI" />
</Fragment>
<?endforeach?>
<Fragment>
<UI Id="MinimalUI">
<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="12" Bold="yes" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="FatalError" />
<DialogRef Id="UserExit" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999"></Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" Order="2"></Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>
Upvotes: 0
Reputation: 2582
If you are using Visual Studio and Wix 3.8 then you could create Wix Setup project and use text below as content of Product.wxs. In my case I needed to copy python and text file into destination dir. Thanks again for original masterpiece, comrade CheGueVerra:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="testwixsetup" Language="1033" Version="2.1.3.0" Manufacturer="ttt" UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="testwixsetup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<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" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="FatalError" />
<DialogRef Id="UserExit" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" Order="2"></Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="COMPANYFOLDER" Name="test-wixinstall">
<Directory Id="INSTALLFOLDER" Name="testwixsetup" />
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="*">
<File Name="test.py"/>
<File Name="test.txt"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Upvotes: 7
Reputation: 7983
All you need to do is add this in your WIX script, it will give you the WelcomeDlg before the installation and show the Installation progress, then the Exit Dialog. Don't forget to add the WixUIExtension.dll to your references.
<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" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="FatalError" />
<DialogRef Id="UserExit" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" Order="2"></Publish>
</UI>
<UIRef Id="WixUI_Common" />
Upvotes: 56