Friday, 21 October 2011

Wix: Showing debug information on dialog boxes

In Wix, a property value can be <empty> or with some value.

One way to find debugging information in Wix is to show it on the setup dialog boxes. For instance, we can show the product code on the welcome dialog box if we find any previous version of the product. We can do this as follows:

<Control Id="Debug1" Type="Text" X="135" Y="150" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.Debug.WelcomeDlgTitleForUpgrade)" >
	<Condition Action="show">DEBUGGING</Condition>
	<Condition Action="hide">NOT DEBUGGING</Condition>

Now we can pass the DEBUGGING parameter as one of the console argument:

msiexec /i "TestApp.msi" DEBUGGING=X                    ------when we want to show debugging information
(you can assign any value to DEBUGGING even 0 (zero), it will work as long as it is not empty)

msiexec /i "TestApp.msi" DEBUGGING=
or msiexec /i "TestApp.msi"                                        ------when we want it to run the normal way

Happy Wixing!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.