wixbiztalkwindows-installerinstallation-pathbtdf

Deploy BizTalk application msi (created with BTDF) via msiexec


We are setting up deployment automation for our BizTalk MSIs that were created with BTDF.

Currently the approach we're working on is by calling msiexec from our deployment toolset. However, we need to install the application in a different folder than the MSI is set to propose.

The BTSF WiX default to C:-drive, whereas we must install to the E: drive. I have tried changing that in the msiexec call, but when passing INSTALLDIR or TARGETDIR, it just throws the msiexec help dialog in my face.

So I figured I should try and take a look at WiX, so that we could build the MSI to default to E: (if available), which would ultimately have the same end result, but WiX is a bit of mystery to me and it seems to have a lot of 'magic' for my understanding at this point.

BTDF by default uses the below structure (and mainly the lower portion of it), and I figure I would have to do something with the TARGETDIR and/or SourceDir. But I can't put my finger on which part is just some kind of variable that can be set.

<Directory Id="TARGETDIR" Name="SourceDir">
  <?if $(var.CreateStartMenuShortcuts) ~= True?>
  <Directory Id="ProgramMenuFolder">
    <Directory Id="BizShortCuts" Name="$(var.ProductName) $(var.ProjectVersion)">
      <Directory Id="BizShortCutsTools" Name="Deployment Tools" />
    </Directory>
  </Directory>
  <?endif?>
  <Directory Id="ProgramFilesFolder" Name="ProgramFiles">
    <Directory Id="ProductDir" Name="$(var.ProductName)">
      <Directory Id="INSTALLDIR" Name="$(var.ProjectVersion)"/>
    </Directory>
  </Directory>
</Directory>

Edit 20180129 Note that this problem occurs in a server environment, with restricted security for my logged in user. We are permitted to run msi installers (right click, custom option 'Run as [authorized user name]', with the msi UI.

In order to accomplish this via command line, I've launched as PS terminal under that other account, which works up until the point where I add the INSTALLDIR parameter. Then it simply displays msiexec help.

I doubt it makes a difference, but local version of msiexec (which works) is 5.0.7601.23593, and serverside (which doesn't work) is 5.0.9600.18333 (i.e. more recent).


Solution

  • First, upgrade to the Deployment Framework for BizTalk v5.6 or newer.

    Second, in your .btdfproj, add DefaultInstallDir:

    <PropertyGroup>
      <!-- existing MSI properties -->
      <ProductUpgradeCode>GUID-HERE</ProductUpgradeCode>
      <!-- add DefaultInstallDir -->
      <DefaultInstallDir>E:\MyCustomPath</DefaultInstallDir>
    </PropertyGroup>
    

    The MSI will now default to E:\MyCustomPath.