Hardware Inventory of registry SMS 2003 sms_def.mof Help!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Steve Adams (steven.adams_at_nospam.com)
Date: 06/17/04


Date: Fri, 18 Jun 2004 10:42:19 +1200

I am trying to modify sms_def.mof to collect some extra registry
information.
I have tried to follow the the whitepaper (published June 14, 2002)
But I am getting errors:

The registry information I am trying to collect is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\CCCImageDetails]
"Build Date"="8/06/2004"
"Build Type"="CCCSTD"
"Build Version"="1.1.165"
"Imaged Date"="10/06/2004"
"Domain"="CCITY"
"AddStatus"="Complete"
"JoinTime"="10/06/2004 11:24:45 a.m."
"JoinVersion"="3.00 03-May-2004"

The following has been added to the end of sms_def.mof

// Workstation Build and Image details
// USed for Windows XP Workstation
// Build and Image Registry Keys
//=====================================================================

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

[DYNPROPS]
class CCCImageDetails
{
    [key]string Keyname="";
     string BuildDate;
     string BuildType;
     string BuildVersion;
     string ImagedDate;
     string Domain;
     string AddStatus;
     string JoinTime;
     string JoinVersion;
};

[DYNPROPS]
instance of CCCImageDetails
{
    KeyName = "CCCImageDetails";

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|Build
Date"),
          Dynamic, Provider("RegPropProv")] BuildDate;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|Build
Type"),
          Dynamic, Provider("RegPropProv")] BuildType;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|Build
Version"),
          Dynamic, Provider("RegPropProv")] BuildVersion;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|Imaged
Date"),
          Dynamic, Provider("RegPropProv")] ImagedDate;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|Domain
"),
          Dynamic, Provider("RegPropProv")] Domain;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|AddSta
tus"),
          Dynamic, Provider("RegPropProv")] AddStatus;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|JoinTi
me"),
          Dynamic, Provider("RegPropProv")] JoinTime;

[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\CCCImageDetails|JoinVe
rsion"),
          Dynamic, Provider("RegPropProv")] JoinVersion;
};

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

[ SMS_Report (TRUE),
  SMS_Group_Name ("CCC Image Details"),
  SMS_Class_ID ("CHRISTCHURCH_CITY_COUNCIL|CCCImageDetails|1.0") ]

class CCCImageDetails : SMS_Class_Template
{
    [SMS_Report (TRUE), key ]
        string KeyName;
     [SMS_Report(TRUE)]
      string BuildDate;
     [SMS_Report(TRUE)]
      string BuildType;
     [SMS_Report(TRUE)]
      string BuildVersion;
     [SMS_Report(TRUE)]
      string ImagedDate;
     [SMS_Report(TRUE)]
      string Domain;
     [SMS_Report(TRUE)]
      string AddStatus;
     [SMS_Report(TRUE)]
      string JoinTime;
     [SMS_Report(TRUE)]
      string JoinVersion;
};
// End

The error I am getting is:

M:\>mofcomp sms_defV2.mof
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.1106
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sms_defV2.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item 104 defined on lines 4688 - 4708 in
file sms_defV2.mof:
Error Number: 0x80041026, Facility: WMI
Description: Class has instances
Compiler returned error 0x80041001

any ideas ?



Relevant Pages

  • Re: Hardware Inventory of registry SMS 2003 sms_def.mof Help!
    ... >I am trying to modify sms_def.mof to collect some extra registry ... string BuildDate; ... > class CCCImageDetails: SMS_Class_Template ... > MOF file has been successfully parsed ...
    (microsoft.public.sms.inventory)
  • Registry Inventory trough editing modified SMS_DEF.MOF
    ... I want to query a few registry value's. ... Mofcomp reported that the mof file was successfully parsed and that the ... * I ran the Hardware Inventory cycle from the control panel. ... * I ran the resource explorer from the sms console for the test system but I ...
    (microsoft.public.sms.inventory)
  • Re: Modifying MOF file to include IE browser info such as its version,
    ... Yes you can modify the MOF file to collect whatever is in WMI. ... the registry provider class. ... in the correct format. ...
    (microsoft.public.sms.inventory)
  • Re: Registry Queries...
    ... You can enable the registry class in the default MOF file, ... query on java.exe and/or services.exe. ... services.exe so I can't tell if these virus files have made it onto our ...
    (microsoft.public.sms.inventory)
  • Environment variables
    ... I would like SMS inventory to collect the content of the registry ... Manager\Environment which contains the system environment variables. ... Could someone provide help and/or post me a sample section of mof file ...
    (microsoft.public.sms.inventory)