Tuesday, May 4, 2010

WiX: How to skip LicenseAgreementDlg – more elegant solution

According to WiX documentation if you want to remove the LicenseAgreementDlg from the WixUI_InstallDir dialog set, you suggested to copy the full contents WixUI_InstallDir.wxs from the WiX sources to your project and than manually edit it.
It isn’t very convenient way.
There is more elegant solution I have found here:

<UIRef Id="WixUI_InstallDir" />
<!-- skip licence dialog -->
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">1</Publish>

Because of a greater value in the Order attribute new events have priority over events, which were set up in WixUI_InstallDir.wxs to redirect to license dialog.

You can use the same technique to add your own manually created dialogs to the installation sequence.

Thanks to slashh!


Alek Davis said...

Great. I was thinking about doing this, but thought it would be too much trouble. Stumbled on your post by accident. Thanks a bunch.

garwin4j said...

Wonderful! this is a great idea thanks! God Bless!

garwin4j said...

Wonderful! this is a great idea thanks! God Bless!

Rémy THULIE said...

Thanks a lot

Владислав Ильчишин said...

I completly agree with garwin4j !
This is very usefull information. Thank you