MSI

warning: Creating default object from empty value in /home/phecht/public_html/ado/modules/taxonomy/taxonomy.pages.inc on line 33.

WIX MSI WXS to install to different drive letters depending on target computer

Using 3.5 I have been able to setup an MSI that will install on E: if available, otherwise install on C:. Instead of using VBS or a C# custom action, I simply add three lines to the WIX.

<Property Id="ROOTDRIVE" Value="C:\">
<DirectorySearch Id="Root_search" Path="E:\" Depth="1"/>
</Property>

ROOTDRIVE is one of those special, poorly documented WIX properties. Once you know it exists, it's function is pretty obvious. It sets the root drive of the install.

You don't need to change the installation order or create a custom action of any kind.

It is pretty simple and I wanted to share it!

Syndicate content