PresentRule

Type

REG_MULTI_SZ

Description

An expression that evaluates to TRUE or FALSE. When the expression evaluates to FALSE, the application does not appear on the Tools menu. SMS writes an error value to the application key as an aid to ISV debugging. If no expression is specified here, PresentRule defaults to TRUE.

This value is examined only under a specified context key when the current context matches that context key.

PresentRule is REG_MULTI_SZ for readability when using regedt32 to view Registry settings. SMS treats nulls as white space when parsing this value.

Expression Syntax

The syntax of the expression is fixed to the following grammar:

Rule: Term
Rule: Term AND|OR Rule
Term: NOT Term
Term: TRUE|FALSE
Term: Test
Term: (Rule)
Test: $(Function) [NoCase] ==|!=|<|>|<=|>= '<text>'
PresentRule: Rule
 

SMS replaces the Function substring with data retrieved from the active MDI window when the application is launched. The argument is processed by the MDI window and is therefore context-sensitive.

Functions Supported in SMS 1.2

Attr(<Class>:<Attribute>)

Searches the SMS database for the given key. Valid only in the SMSMachine context. If this argument cannot be resolved, SMS writes an error value into the Registry application key as an aid to ISV debugging.

Example:

$(Attr(MICROSOFT|OPERATING_SYSTEM|1.0:Operating System Name)) == 
'Microsoft Windows NT'
 

Column(<name>)

Returns the string from the named column for the item with the caret (selection point) in the table of the active window.

Example:

$(Column(SystemRole)) == 'Server'
OR
$(Column(SystemRole)) == 'Workstation'
 

Note that the AND operator in these expressions has a higher precedence than OR.