AddResource Command: Preprocessing Script

 

To add a preprocessing script to a BizTalk application, you use the AddResource command and specify System.BizTalk:PreProcessingScript for the Type parameter. Running this command adds the script file to the BizTalk Management database. The script file is also displayed in the BizTalk Administration console, in the Resources folder of the application to which you added it. In addition, the file is listed when you use the ListApp Command.

A preprocessing script runs from the .msi file before application import or installation, or after uninstallation. You can also use BTSTask to add a postprocessing script, which runs after application import or installation, or before uninstallation, as described in AddResource Command: Postprocessing Script. For more information about preprocessing and postprocessing scripts, see Using Pre- and Post-processing Scripts to Customize Application Deployment.

BTSTask AddResource [/ApplicationName:value] /Type:System.BizTalk:PreProcessingScript[/Overwrite] /Source:value [/Destination:value] [/Server:value] [/Database:value][/Property:Args="argument list"]

ParameterRequiredValue
/ApplicationName (or /A, see Remarks)NoName of the BizTalk application to which to add the script. If the name includes spaces, you must enclose it in double quotation marks ("). If the application name is not specified, the default BizTalk application for the group is used.
/Type (or /T, see Remarks)YesSystem.BizTalk:PreProcessingScript (This value is not case-sensitive.)
/Overwrite (or /O, see Remarks)NoOption to update an existing script. If not specified, and a script file already exists in the application that has the same name as the script file being added, the add operation fails.
/Source (or /So, see Remarks)YesFull path of the script file, including the file name. If there are spaces in the path, you must enclose it in double quotation marks (").
/Destination (or /De, see Remarks)NoFull path of the location where the script file is to be copied when the application is installed from the .msi file. If not provided, the file is not copied to the local file system during installation. If this script is supposed to run during application uninstallation, you should specify Destination; otherwise, the script will not reside on the local file system, and will not be able to run during uninstallation. If there are spaces in the path, you must enclose it in double quotation marks (").
/Server (or /Se, see Remarks)NoName of the SQL Server instance hosting the BizTalk Management database, in the form ServerName\InstanceName,Port.

Instance name is only required when the instance name is different than the server name. Port is only required when SQL Server uses a port number other than the default (1433).

Examples:

Server=MyServer

Server=MyServer\MySQLServer,1533

If not provided, the name of the SQL Server instance running on the local computer is used.
/Database (or /Da, see Remarks)NoName of the BizTalk Management database. If not provided, the BizTalk Management database running in the local instance of SQL Server is used.
/Property (or /P, see Remarks)NoZero or more resource properties that will be passed to the script as arguments when the script is invoked.

BTSTask AddResource /ApplicationName:MyApplication /Type: System.BizTalk:PreProcessingScript /Overwrite /Source:"C:\Source Scripts\MyScript.vbs" /Destination:"C:\New Scripts\MyScript.vbs" /Server:MyDatabaseServer /Database:BizTalkMgmtDb /Property:Args="argument1 argument2"

Parameters are not case-sensitive. You do not need to type the entire parameter name to specify it; you can type the first few letters of the parameter name that identify it unambiguously.

The following extensions are supported for script files: .com, .exe, .bat, .cmd, .vbs, .vbe, .js, .jse, .wsf, .wsh.

AddResource Command
How to Add a Pre- or Post-processing Script to an Application

Community Additions

ADD
Show: