Runtime Tab

InstallShield 2024 » SQL Scripts View » SQL Connection » SQL Script

Project: The SQL Scripts view is available in the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI

You can configure the following settings on the Runtime tab for a SQL script in the SQL Scripts view.

Runtime Tab Settings for a SQL Script

Setting

Project Type

Description

Script Execution

Basic MSI, DIM, InstallScript, InstallScript MSI

To indicate when you want the installation to execute a SQL script, select the appropriate check box. Available options are:

Run Script During Install—This option enables you to run a custom script during installation. This option is also associated with component state because each script is associated in with a feature. Therefore, in Basic MSI, DIM, and InstallScript MSI projects, you can specify conditional statements in conjunction with this setting in the Script Condition area of this tab.

In Basic MSI, DIM, and InstallScript MSI projects, the ISSQLServerInstall action is associated with this option.

In InstallScript projects, the InstallScript function SQLRTComponentInstall is associated with this option.

Run Script During Uninstall—This option enables you to run a custom script during uninstallation. This option is also associated with component state because each script is tied in with a feature by design. Therefore, you can specify conditional statements in conjunction with this setting in the Script Condition (only available for Basic MSI and InstallScript MSI projects) section of this tab.

In Basic MSI, DIM, and InstallScript MSI projects, the ISSQLServerUninstall action is associated with this option.

In InstallScript projects, the InstallScript function SQLRTComponentUninstall is associated with this option.

Script Execution (cont.)

 

Run Script During Rollback—This option enables you to run a custom script during rollback. InstallShield does not roll back the changes automatically. You will have to run a custom script allowing rollback when you select the Run Script During Rollback option.

In Basic MSI, DIM, and InstallScript MSI projects, the ISSQLServerRollback action is associated with this option.

Run Script During Login—This option enables you to run your script during login. Note that there are some limitations with this option. For example, note that the script changes are irreversible once the end user clicks the Next button on the SQLLogin dialog at run time. If the end user attempts to cancel the installation before clicking the Install button on the ReadyToInstall dialog, the script changes are not rolled back.

Also note that the script is executed after credentials and requirements are verified and before a connection has been made to the catalog. Therefore, any schema version requirements that you set for the script during installation design will not have taken place at run time.

In Basic MSI, and DIM projects, the ISSQLServerValidate action is associated with this option.

In InstallScript MSI projects, the InstallScript function SQLRTServerValidate is associated with this option.

In InstallScript projects, the InstallScript function SQLRTConnect is associated with this option.

Script Error Handling

Basic MSI, DIM, InstallScript, InstallScript MSI

Specify how you want SQL script errors to be handled at run time. Available options are:

On Error, Go to Next Script
On Error, Go to Next Statement
On Error, Abort Installation

Script Condition

Basic MSI, DIM, InstallScript MSI

If you want to specify a condition that Windows Installer must evaluate before the SQL script is run during installation or uninstallation, select the check box and type the conditional statement in the text box. The SQL script is not run if the condition evaluates to false.

As an alternative to manually entering a statement, you can click the ellipsis button (...) to launch the Condition Builder dialog box, which simplifies the process of creating a condition.

See Also