Using Scripts with Site Packager

You can use three types of Microsoft Visual Basic scripts with Commerce Server Site Packager.

Pre-packaging scripts

Post-packaging scripts

Application scripts

Packing Extended Profile Schema

Pre-packaging scripts

Site Packager executes a pre-packaging script as soon as the package name is known, before the site is unpacked. Pre-packaging scripts must be named Pre<package name>.vbs**, for example, PreRetail.vbs.

A pre-packaging script is provided with one parameter, mode ( /s: ), which indicates whether Site Packager is running in silent mode or normal installation mode. In order for the pre-packaging scripts to run, they must reside in the same folder as the package you are unpacking.

Post-packaging scripts

Site Packager runs a post-packaging script after all unpacking is complete, but before the Unpacking is complete! dialog box appears. Post-packaging scripts must be named Post<package name>.vbs**, for example, PostRetail.vbs. A post-packaging script is provided with two parameters:

  • Site name in quotation marks ("MySite")

  • Mode ( /s: ) — silent mode or normal installation mode

Post-packaging scripts must reside in the same folder as the package you are unpacking in order for them to run.

Application scripts

Site Packager can also run application-specific scripts. Application scripts are provided with six parameters:

  • Site name in quotation marks (/n:"MySite")

  • Application name in quotation marks (/r:"MyApp")

  • Server number or the instance number of the IIS Web site that the application was installed to (/i:1)

  • Name of the virtual directory that the application was installed to (/v:"MyRoot")

  • File path in quotation marks where the application files were installed (/d: "C:\inetpub\wwwroot")

  • Mode (/s:) — silent mode or normal installation mode

Application scripts are run for each application after the following events occur:

  • The application has been installed and the files copied.

  • The IIS properties have been set for the application.

  • The application information has been written to the Administration database.

  • Site Packager has notified the Data Warehouse that the application exists.

Note

  • If you create and use an unpack.vbs script file when you unpack a non-Commerce Server Business Desk application, make sure you delete or secure the file immediately after unpacking. The file exists in the root directory, and can be accessed by anonymous users. Unauthorized use of this script could lead to denial of service or the breaking of site settings.

See Also

Running Site Packager from the Command Line

Customizing the Site Packager .ini Files

Packing Extended Profile Schema

If you want to create a package that contains an extended profile schema, you must generate the script before you package your site. The following steps outline how to package an extended profile schema:

  1. Use SQL Server Enterprise Manager to extend the UserObject table, adding your own attributes. For more information, see the SQL Server documentation.

  2. Add the new data members to the data object. For more information, see Adding a New Data Member.

  3. Use SQL Server Enterprise Manager to generate scripts for your extended profile schema. For more information, see the SQL Server documentation.

  4. When you package your site, Site Packager prompts you to specify the location of the schema definition script you generated. If you do not specify your script, Site Packager will package the default script, which will not include your extension.

See Also

UserObject Profile Schema

Packaging a Site


All rights reserved.