Re: Hardware Inventory of registry SMS 2003 sms_def.mof Help!

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Joseph Calabig [MSFT] (jcalabig_at_microsoft.com)
Date: 06/17/04


Date: Thu, 17 Jun 2004 15:55:26 -0700

WMI complained that you're editng a class definition while it has instances.
You should first delete these classes through wbemtest.exe then do your
mofcomp.

Or try mofcomp.exe -class:forceupdate your.mof

-- 
Thanks,
Joseph Calabig
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Adams" <steven.adams@nospam.com> wrote in message 
news:ueQ4exLVEHA.2944@tk2msftngp13.phx.gbl...
>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: Importing Excel files with columns > 255 chars
    ... or similar string manipulation to get the required maximum length. ... to change the column width of Error output columns, ... Create a connection to that spreadsheet and check the data ... the following registry key when reading the spreadsheet: ...
    (microsoft.public.sqlserver.dts)
  • Re: ascii -> hex-wandler und Reg_Binary eintrag
    ... Integer usw. und Strings klar machen. ... Damit schreibst Du die ASCII-Werte der in dem String OutputText enthaltenen ... Zeichen in die Registry. ... Du solltest Dich erst mal gründlich mit Grundlagen wie Datentypen ...
    (microsoft.public.de.vb)
  • Re: Editing Registry in WinCE 6.0
    ... ActivateDeviceEx and DeactivateDevice calls to load/unload my driver. ... This reads a string value from the reg. ... Copy this registry to file. ... Saves you from having to reboot all the time... ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Securing my app with serial number
    ... The app has two passwords hard-coded into it, we'll call them A and B. ... It then encrypts that string with password A, ... and stores it in the registry as a challenge code. ... I can also insert some extra data into the beginning of unlock code ...
    (microsoft.public.dotnet.languages.vb)
  • OT - Another Windows Vulnerability
    ... The now infamous Regedit vulnerability ... "The weakness is caused due to an error in the Registry Editor ... Utility when handling long string names. ... to hide strings in the "Run" registry key. ...
    (rec.outdoors.rv-travel)