About one year ago, I created a small command line utility to completely remove a BizTalk Application on a group of server.
It's now on codeplex and here are some information on how to use it. 
 

How to use BTSZap

BTSZap is a small utility aimed at removing a biztalk application on a group of servers

BTSZap works with BizTalk 2006 R2 andt BizTalk 2009.

It's a command line utility with several options available through the use of switches.

BTSZap includes the following functionalities :

Ø  Backup the application (MSI)

Ø  Uninstall the MSI on every server (if the application was installed with a MSI)

Ø  Terminates active instances (I.E. Full Stop the application)

Ø  Stop and remove the application

Ø  Remove from GAC assemblies

Ø  Restart host instances

Command line options and usage example:

 

BTSZap syntax is :

BTSZap NameOfParameter1:Value1 ... NameOfParameterN:ValueN

In order to obtain the full list of parameters, launch BTSZap with no parameters:

 

Syntaxe : BTSZap Argument1:Value1 Argument2:Value2

Parameters Usage :
------------------

 Language:String
   if not specified : use user settings otherwise language code EN,FR...

 ApplicationName:String
   Name of the BizTalk application to UnInstall

 [AutoDetectConfig:Boolean] Default=True
   If enabled, try to auto detect SQL Server and Management Database

 [DatabaseServer:String] Default=.
   Name the database server instance hosting BizTalk management Db

 [ManagementDatabase:String] Default=BiztalkMgmtDb
   Name of the management DB

 [UnGAC:Boolean] Default=False
   Try to Un-GAC assemblies on all Biztalk Server

 [RestartHostInstances:Boolean] Default=True
   Enable restarting host instances after removing application

 [FullStop:Boolean] Default=True
   Do a full stop before removing. I.E. Kill running instances

 [NoConfirmation:Boolean] Default=False
   Disable confirmation

 [InfoLevel:Int32] Default=2
   Information Level (0 to 3)

 BackupMSIFile:String
   Path and name of the MSI File to create. (If not present, no backup will be d
one)

 MSI:String
   name of the MSI package to uninstall

 [HaltOnError:Boolean] Default=True
   if true, halt on critical errors. Otherwise try to continue

 

Example :

BTSZap ApplicationName:Rental FullStop:true BackupMSIFile:c:\Rental.msi AutoDetectConfig:false UnGac:true DatabaseServer:localhost InfoLevel:3 Language:EN MSI=Rental HaltOnError:false

This asks BTSZap to do the following:

Ø  ApplicationName:Rental --> uninstall Rental Application

Ø  FullStop:true --> terminate active instances

Ø  BackupMSIFile:c:\Rental.msi --> backup the application to c:\rental.msi

Ø  AutoDetectConfig:false --> do not detect BizTalk Management database connection parameters

Ø  UnGac:true --> remove assemblies from GAC

Ø  DatabaseServer:localhost --> connect to BizTalk Management database on server: localhost

Ø  InfoLevel:3 --> information level 3

Ø  Language:EN --> force the use of english for messages

Ø  MSI:Rental --> name of application as it appears in the program list

Ø  HaltOnError:false --> do not stop on error

Where to download & Remark

You can download BTSZap on codeplex.  http://btszap.codeplex.com

Warning, if you recompile in debug mode, BTSZap will break on every step

Hope it will be usefull,

Roch BADUEL

Publié le 11/10/2009  par Roch Baduel