Project Description
BTSControl.exe is a BizTalk Application Deployment Tool for Microsoft BizTalk Server 2006 (R1 and R2). It is the companion tool to BTSTask.exe that Microsoft never wrote (but we sure wish they did). This commandline tool allows you to start a BizTalk application, partially stop a BizTalk application, get the service instance count for a given BizTalk application, completely stop a BizTalk application, and restart host instances for a given application. It is intended to be used as part of a batch file or scripted deployment.

At the time that this tool was mashuped together, it was unknown to the editor ("editor" because I cannot really claim full authorship of this code), that there is a very similar commandline tool for BizTalk deployment found elsewhere on CodePlex, i.e BizTalk 2006 application restart util. There are a couple of key differences:
  1. behavior: commandline and argument parsing is, for all purposes, identical to the behavior you would expect from BTSTask.exe
  2. functionality: in addition to being able to start and stop a BizTalk application, you can Restart Host Instances and Get the Service Instance Count for a BizTalk application (no, there is no option for "TerminateAll"). Also, you can specify which BizTalk server you wish to control in the same exact way you can specify using BTSTask.exe
The utility requires no install; simply copy it into your BizTalk installation directory (e.g. "C:\Program Files\Microsoft BizTalk Server 2006\") and run it as you would
BTSTask.exe. If you run it without parameters, it prints out a help screen similar to the one below:
btscontrol_usage_screenshot.JPG

Detailed help of each command can be obtained by typing btscontrol followed by the name of the command and /? . See the screenshot below for an example:
btscontrol_startapphelp_screenshot.JPG

Finally, the source code contains two full deployment batch files that demonstrate how to call BTSControl.exe in tandem with BTSTask.exe.
I don't feel that it's too much of a stretch of the imagination to think of ways in which a clever developer might call these batch files (or commands in them)
remotely from another server using WMI's Win32_Process class...;)

Last edited May 21, 2008 at 7:56 PM by SubcutaneousD, version 10