Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying the .mof SMS 2003

Status
Not open for further replies.

wwlcos

Technical User
Jan 8, 2007
3
US
Having trouble modifying the .mof in SMS 2003. Below is the registry key I'm collecting on:

#pragma namespace("\\\\.\\root\\cimv2")

[DYNPROPS] class Reboot_Required
{
[key]
string Keyname="";
string Flags;
};

[DYNPROPS] instance of Reboot_Required
{
KeyName = "Reboot_Required";
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Updates\\UpdateExeVolatile|Flags"),
Dynamic, Provider("RegPropProv")] Flags;
};

#pragma namespace ("\\\\.\\root\\cimv2\\sms")

[SMS_Report(TRUE),
SMS_Group_Name("Reboot_Required_All"),
SMS_ClassID("Reboot_Required")]
Class Reboot_Required : SMS_Class_Template
{
[SMS_Report(TRUE),key]
string KeyName;
[SMS_Report (TRUE)]
string Reboot_Required;
};

Below is the actual registry entry:



HKLM\SOFTWARE\Microsoft\Updates\UpdateExeVolatile
Value 0 = no reboot needed
Values 1/2/3 = reboot needed

If this key is missing completely, then there are no pending restarts.

In the above example I removed two of our updates, a .NET patch and a Windows Security Patch, which created two keys:
UpdateExeVolatile
UpdateExeVolatile_X

Only updates built with version 6.1.22.0 or later versions will set these flags.
Therefore, this registry key may not always indicate whether a restart is pending, as
there are still software update packages built with older versions of Update.exe.

Where am I going wrong?

Bill
 
I don't have a test server in front of me, but try changing this:

{
[SMS_Report(TRUE),key]
string KeyName;
[SMS_Report (TRUE)]
string Reboot_Required;
};

to this:

{
[SMS_Report(TRUE),key]
string KeyName;
[SMS_Report (TRUE)]
string Flags;
};

and see if that gives you the results you want to see in Resource Explorer.

Blog:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top