0

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).

2
  • Are you sure you are setting the INSTALLDIR property properly in your command line? What is your msiexec.exe command line? When you set a property with spaces in the value you must use quotes around the value; INSTALLDIR="E:\Product Name\Install Folder" Commented Jan 26, 2018 at 16:58
  • So, this works on my local dev, but not on our test server. The main differences between these machines is that the local machine doesn't run a server OS, is more restrained in security policies (obviously), and that I need to run msiexec as a different user than the logged in user. But if security would be a problem, I would expect an error message with that kind of feedback, rather than popping up the help box, but perhaps that's simply how msiexec works? Commented Jan 29, 2018 at 10:11

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, this is a great option to resolve the issue, although I'm still curious for the cause/resolution for the msiexec INSTALLDIR parameter issue.
I did find that when you use the DefaultInstallDir option to another drive, and that drive doesn't exist on the target machine, msiexec fails with a message 'The folder path [...] contains an invalid character'. Although this is somewhat annoying, it unintentionally prevents anyone from installing a BizTalk application onto a machine that's not supposed to run it, since local workstations typically don't have an E:-drive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.