This project has moved and is read-only. For the latest updates, please go here.

Different MSI and master bindings based on region

Topics: Bindings File, Settings Management and SSO
Mar 14, 2013 at 7:14 AM
Hi,

I need to create 2 MSI from the same the BizTalk Solution based on the region category. The bindings for the same as different (no. of send ports) for each region.

There are 2 ways of doing it -
  1. Use the master binding with loads of pre-processing scripts.
  2. Creating a different MSI based on the region with its own Master Binding File.
I want to try Step 2 here. I am relatively new to BTDF, so kindly explain in detail, if possible. And here are my queries for the same:

Q1. I want to have user parameter passed as region code to create the MSI accordingly. Is it possible and how?

Q2. If above is not possible, then can I have multiple master binding files based on region which would get selected based on user input at the runtime using InstallWizard.xml? How can I save the value of the variable in InstallWizard and use it in my BTDF Project file to select appropriate master bindings for pre-processing?

Thanks,
neel :)
Mar 14, 2013 at 7:40 PM
Hi Neel,

Creating a single MSI with multiple master binding files is going to be the easiest path.

One binding file will just be the "default" and the other an add-on.

First, add the new master binding XML next to your existing one. Then add this code to your .btdfproj to copy the extra bindings file into the MSI:
<Target Name="CustomRedist">
    <!-- Force MSBuild to expand the item spec into physical file specs -->
    <CreateItem Include="$(MSBuildProjectDirectory)\Region2PortBindingsMaster.xml">
      <Output TaskParameter="Include" ItemName="ExtraBindingsSourceGroup" />
    </CreateItem>

    <Copy DestinationFolder="$(RedistDir)\Deployment" SourceFiles="@(ExtraBindingsSourceGroup)"/>
</Target>
Next, modify your InstallWizard.xml to include another wizard page (another SetEnvUIConfigItem element) that collects the filename of the additional bindings file. It cannot be the full path, only the file name. The EnvironmentVarName value must be PortBindingsMaster.

The net effect is that on a server deployment there will be a new page in the wizard to ask for the master bindings file name, and that file name will be routed into the deployment process via the MSBuild command line when the script is launched. That should be enough to do what you're asking.

Thanks,
Tom
Mar 18, 2013 at 1:17 PM
Edited Mar 18, 2013 at 1:17 PM
Thanks Tom.

I could alter the installwizard.xml and btdf.proj file accordingly and test them out. It works fine.
  1. For some improvization in the same, can I have radio buttons (with list of region) on installwizard.xml instead of allowing the user to key in the region.xml?
  2. Second requirement is related to conditionally allowing user to select the checkbox on installwizard asking whether to deploy virtual directories or not. All the Biztalk servers dont have IIS installed on it. So, we need user to choose whether the virtual directories needs to be deployed or not.
    Kindly let me know any specific variable name to be used for the same in installwizard.xml.
Thanks, neel :)
Apr 11, 2013 at 8:10 AM
Hi Neel,

Your first question led me to realize that the SetEnvUIConfig.xsd and related documentation in the v5.0 release is out-of-date. The wizard does support radio buttons (even in the current v5.0 code). Here is an example wizard page with radio buttons:
  <SetEnvUIConfigItem>
    <PromptText>Please select Debug or Release:</PromptText>
    <PromptValue>Rls</PromptValue>
    <ValueType>RadioButtons</ValueType>
    <EnvironmentVarName>DebugOrRelease</EnvironmentVarName>
    <RadioPrompts>
      <string>Debug</string>
      <string>Release</string>
    </RadioPrompts>
    <RadioValues>
      <string>Dbg</string>
      <string>Rls</string>
    </RadioValues>
  </SetEnvUIConfigItem>
The documentation around this is updated for the v5.1 release.

Regarding your second question, the SetEnvUI.exe tool cannot handle that scenario today (showing or not showing a wizard page based on some input). However, if you always collect the answer and the user chooses to deploy vdirs on a box without IIS, you can handle that cleanly inside your .btdfproj.

Thanks,
Tom