WiX deployment tips and tricks

Designer for WiX Toolset

Add-in Express Home > Designer for WiX toolset > Online Guide > Tips and notes

Tips and notes

On this page, you will find a few tips that can help you avoid common deployment problems:

Configuring IIS

Microsoft gives the following advice about IIS configuration:

When you create a Web Setup deployment project in Visual Studio, you have to turn on the "Windows IIS Metabase and IIS 6 configuration compatibility" feature. You also have to be logged on as an Administrator; otherwise you will be unable to run setup.exe to install the project.

For more information, please see msdn.microsoft.com.

Prerequisites

To ensure that your application will install and run successfully, you must first ensure that all components upon which your application is dependent are installed on the target computer. An example of such a component is the .NET Framework; the correct version of the common language runtime must be present on the destination computer before the application is installed.

To install the .NET Framework and other redistributables as a part of your installation, you can select these prerequisites in the Prerequisites dialog box; to open it, see the Prerequisites property of the setup project.

In the project's properties, click the Prerequisites button.

Select the required prerequisites.

Create setup program to install prerequisite components Includes the prerequisite components in your application's Setup program (Setup.exe) so that they will be installed before your application, in order of dependency. By default, this option is selected. If it is not selected, no Setup.exe is created.
Choose which prerequisites to install Specifies whether to install components. For example, by selecting the check box next to Microsoft .NET Framework 4 (x86 and x64), you specify that the Setup program verify whether this component is installed on the target computer and install it if it is not already installed.
Download prerequisites from the component vendor's web site Specifies that the prerequisite components be installed from the vendor's Web site. This is the default option.
Download prerequisites from the same location as my application Specifies that the prerequisite components be installed from the same location as the application. This copies all the prerequisite packages to the publish location. For this option to work, the prerequisite packages must be on the development computer.
Download prerequisites from the following location Specifies that the prerequisite components be installed from the location that you select. You can use the Browse button to select a location.

How to prevent running Install and Uninstall custom actions during upgrade

To prevent running an Install custom action when the product is being upgraded, you can specify the following criteria in the Condition property of the custom action:


NOT (Installed OR OLDPRODUCTFOUND)

The Installed property is described here. As to the OLDPRODUCTFOUND property, you need to define it yourself. Here's an example:


<Upgrade Id="{%YOURGUID%}">
    <UpgradeVersion 
		Minimum="1.12.0" 
		Property="NEWPRODUCTFOUND" 
		OnlyDetect="yes" 
		IncludeMinimum="no" 
		Language="1033" />
    <UpgradeVersion 
		Maximum="1.12.0" 
		Property="OLDPRODUCTFOUND" 
		OnlyDetect="no" 
		IncludeMinimum="yes" 
		IncludeMaximum="no" 
		Language="1033" />
</Upgrade>

To prevent running an Uninstall custom action when the program is upgraded, you specify the following criteria in the Condition property of the custom action:


NOT UPGRADINGPRODUCTCODE

The UPGRADINGPRODUCTCODE property is described here.