cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
OlgaShvydka
Level 2

SQL Script conditions are not work while Minor Upgrade

Hi,
I need to avoid SQL script execution while minor upgrade. I set the following condition for in Conditional Statement of Runtime tab for SQL script: Not IS_MINOR_UPGRADE, but SQL script is executed because Component State=Install
I even tried to set certainly failed condition like 1<>1 but component state was still Install!
I have also tried to use IS_SQLSERVER_CXNS_ABSENT_FROM_INSTALL and set connection name to skip, but as Conditional Statement, this works only at install mode and doesn’t work at maintenance mode.
Is this is bug? If there any workaround for this bug?
Labels (1)
0 Kudos
(2) Replies
Not applicable

SQL Scripts use component conditions during installation and as such are subject to those rules. Specifically, this section involving the Condition column of that table is relevant:


This column contains a conditional statement that can control whether a component is installed. If the condition is null or evaluates to true, then the component is enabled. If the condition evaluates to False, then the component is disabled and is not installed.

The Condition field enables or disables a component only during the CostFinalize action. To enable or disable a component after CostFinalize, you must use a custom action or the DoAction ControlEvent to call MsiSetComponentState.

Note that unless the Transitive bit in the Attributes column is set for a component, the component remains enabled once installed even if the conditional statement in the Condition column later evaluates to False on a subsequent maintenance installation of the product.

The Condition column in the Component table accepts conditional expressions containing references to the installed states of features and components. For information on the syntax of conditional statements, see Conditional Statement Syntax.


http://msdn2.microsoft.com/en-us/library/aa368007(VS.85).aspx
0 Kudos
OlgaShvydka
Level 2

Thank you very much!
I have resolved the problem with Transitive bit.
0 Kudos