Deploying via Script to a Single BizTalk Server

Parent Previous Next

Before you begin, you must have a copy of the BizTalk application's MSI created through the previously described steps.  Follow this process to install and deploy a BizTalk application to a single BizTalk server.


Step 1 of 2: Install the MSI

Before the BizTalk application can be deployed to BizTalk, it must be installed on the server:


  1. Copy the application's MSI to the BizTalk server
  2. Install the MSI


In general, you'll install the MSI using the Windows Installer command-line tool msiexec.exe:


msiexec.exe /i MyBizTalkApp.msi /passive /log MyBizTalkAppInstall.log INSTALLDIR="C:\Program Files\MyBizTalkApp\1.0"


The /i parameter specifies the MSI name, /passive activates unattended mode to show only a progress bar and /log creates a log file.  The final, and optional, parameter INSTALLDIR overrides a Windows Installer property that is predefined within the MSI.  INSTALLDIR specifies the file system path at which the application files will be installed.


A good option for remote execution of msiexec.exe across the network on the BizTalk server is Microsoft SysInternals PsExec.  WinRS.exe is another possible option.


Step 2 of 2: Deploy the Application into BizTalk

Now that the BizTalk application's files have been installed on the BizTalk server, the application is ready to be deployed into BizTalk.


The deployment script is executed by MSBuild.exe.  Many servers will have several versions of MSBuild.exe installed: one from .NET Framework 2.0, one from .NET Framework 3.5 and another from .NET Framework 4.0.  Any version should work.  The important thing is to run the 32-bit MSBuild.exe, even on Windows x64.


For this example, I'll assume that .NET Framework 4.0 is installed.


The command shown below executes the deployment process:


"%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /p:DeployBizTalkMgmtDB=true;Configuration=Server;SkipUndeploy=true /target:Deploy /l:FileLogger,Microsoft.Build.Engine;logfile="C:\Program Files\MyBizTalkApp\1.0\DeployResults\DeployResults.txt" "C:\Program Files\MyBizTalkApp\1.0\Deployment\MyBizTalkApp.btdfproj" /p:ENV_SETTINGS="C:\Program Files\MyBizTalkApp\1.0\Deployment\EnvironmentSettings\Exported_ProdSettings.xml"


The /p parameter includes multiple Property=Value pairs separated by semicolons.  This allows MSBuild properties to be defined directly from the command-line, where they will take precedence over default values set within the deployment project.


Pay particular attention to the ENV_SETTINGS property, which points to one of the settings XML files exported from the settings spreadsheet.  In an interactive deployment, this path is collected from the user in the deployment wizard.  With a scripted deployment, you must provide the path yourself.



Created with the Personal Edition of HelpNDoc: Free Kindle producer