Not Rules

The Not rule setting in System Center Updates Publisher can be enabled on any rule. When a Not rule is evaluated, the logical result of the rule is reversed. Therefore, a rule that typically results in TRUE with the Not rule setting disabled results in FALSE when it is enabled. The Not rule setting is configured for individual rules and cannot be applied to groups of rules in the Updates Publisher.

Viewing Not Rules in Expression Builder

When viewing rules in the Expression Builder, Not rules contain NOT at the start of the rule description, making them easily identifiable. On the XML View tab, a Not rule is wrapped with the Not logical operator XML tag. For example, <lar:Not>{rule xml}</lar:Not>.

Not Rules Might Cause Unexpected Behavior

Some rules have implied rules within them that might cause unexpected behavior when they are made into Not rules. For example, if a File Version rule is created to find MyFile.dll with the version equal to 1.20.30.4000, there are really two rules combined into one and grouped with an AND operator.

The first rule is an implied rule that the file MyFile.dll exists. The explicit rule is that the file has the version 1.20.30.4000. When this rule is made into a Not rule, it will return True for the following conditions:

  • MyFile.dll does not exist.

  • The MyFile.dll version does not equal 1.20.30.4000.

If the intention of the rule is to verify the MyFile.dll version is not 1.20.30.4000, it is necessary to combine the File Version rule with a File Exists rule. For example, the Expression Builder would look similar to the following:

**        ( File Exists Path="MyFile.dll"**

And    NOT File Version Path="MyFile.dll"Comparison="Equal To"Version="1.20.30.4000" )

See Also

Tasks

How to Use the Expression Builder

Other Resources

Managing Rules in Updates Publisher
Updates Publisher Rules