CheckRegValue (UnitMonitorType)

Element properties:

RunAsDefault
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
RegDS DataSource Microsoft.Windows.RegistryProvider Default
CDBad ConditionDetection System.ExpressionFilter Default
CDGood ConditionDetection System.ExpressionFilter Default

Source Code:

<UnitMonitorType ID="CheckRegValue" Accessibility="Internal">
<MonitorTypeStates>
<MonitorTypeState ID="RegValueBad" NoDetection="false"/>
<MonitorTypeState ID="RegValueGood" NoDetection="false"/>
</MonitorTypeStates>
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="Path" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="ComputerName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="AttributeName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="PathType" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="AttributeType" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="RegistryValue" type="xsd:int"/>
</Configuration>
<OverrideableParameters/>
<MonitorImplementation>
<MemberModules>
<DataSource ID="RegDS" TypeID="Windows!Microsoft.Windows.RegistryProvider">
<ComputerName>$Config/ComputerName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>$Config/AttributeName$</AttributeName>
<Path>$Config/Path$</Path>
<PathType>$Config/PathType$</PathType>
<AttributeType>$Config/AttributeType$</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>900</Frequency>
</DataSource>
<ConditionDetection ID="CDGood" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">Values/$Config/AttributeName$</XPathQuery>
<!--Not sure if this will work passing this in this capacity, but it builds-->
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">$Config/RegistryValue$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="CDBad" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">Values/$Config/AttributeName$</XPathQuery>
<!--Not sure if this will work passing this in this capacity, but it builds-->
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">$Config/RegistryValue$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="RegValueBad">
<Node ID="CDBad">
<Node ID="RegDS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="RegValueGood">
<Node ID="CDGood">
<Node ID="RegDS"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>