Udostępnij za pośrednictwem


Check for existence of a hot fix / Service Pack with DCM Solution

How many times would you have wanted to check if a certain hot fix or a Service Pack is installed on a machine? Well it’s pretty simple to do with the DCM Solution Accelerator! This article shows you exactly how to do it.

 

Same three questions as before J…

 

  • What is it that I want to do? Check for existence of a hot fix called KB12345.
  • Where is the data for the hot fixes located? In WMI under the namespace root\cimv2 in the class Win32_QuickFixEngineering. Theproperty I need is hotfixID.
  • What is by desired hot fix? KB12345

Steps:

  1. Create a WMI data source and populate properties

Name: WMI DS

Namespace: root\cimv2

WMI Class Name: Win32_QuickFixEngineering

 

  1. Create a Setting and populate properties

Property: HotfixID

 

  1. Create a rule and populate properties

Rule Name: CheckHotfix

Rule Type: Active

Rule Query: exists('KB12345')

How to generate Query?

Click Build Rule Query. In the Functions dropdown, select Exists. In the Expression textbox, enter KB12345 and hit the Save Rule button.

 

Event Description: The hot fix KB12345 does not exist!

Event ID: 123

Severity: Error

 

This is how you would check for the existence of a hot fix or a service pack. I have included the sample manifest in this post!

 

Important!!!

However, please take care of the following:

1. If you create a rule using Exists function, you should not use the same data source / setting to create another rule. Please duplicate by creating another data source / setting if would like to create new rules.

2. This is more like a fyi... When you create an Exists function, the UI automatically appends a Where Clause to the WMI Data source. Please do not change it.

hotfix.xml