Hello,
The execution of your script fails because you are conditioning it using a private property. Private properties values are not preserved upon moving from the
"Wizard Dialogs Stage" to the
"Install Execution Stage", their values being set back to their defaults. In this case, the value of
"InstallMode" property when your script is running (in
"Install Execution Stage" -->
"Add Resources" action group) is
"Typical", resulting in the failure of your script.
As a workaround, you can use a public property instead. Public properties values are preserved upon moving from the
"Wizard Dialogs Stage" to the
"Install Execution Stage".
To achieve those said above, you can go to
"Dialogs" page, click on
"ClientServerDlg" --> Click on the image placed to the left side of "Server" --> under
"Published Events" tab click
"New..." -->
"Set installer property value" --> in the
"Property" field specify the name of the public property which will store the value of
"InstallMode" property (for example, you can name it
INSTALLER_MODE) --> in the
"Argument" field specify the value that your public property will have (in our case, the value is
[InstallMode]) --> leave the condition field unchanged --> press
"Ok".
Now that we have set the our public property to have the value of
"InstallMode" private property, it is time to condition the execution of our SQL script. To do so, you can go to
"SQL Databases" page and in condition tab, insert the following line:
Please note that
INSTALL_MODE is the name we gave to the public property which stores the value of "InstallMode" private property. You can name this however you want.
Hope this helps!
Regards,
Catalin