Help with extending MOF to add Registry info - SMS 2003
- From: "Victag" <miketaggart@xxxxxxxxx>
- Date: 4 Dec 2006 11:03:40 -0800
I have been testing this MOF change on my client and am getting errors
that the Class does not have instances when I try to view the info in
WMI. We are trying to get the last user logon. Any help is
appreciated. My MOF change is below:
//---------------------------------------------------------------------------
//Start of LastRealUser Information
//---------------------------------------------------------------------------
//Register the Registy Property Provider
#pragma namespace("\\\\.\\root\\cimv2")
instance of __Win32Provider as $PropProv2
{
Name ="RegPropProv" ;
ClsID = "{72967901-68EC-11d0-B729-00AA0062CBB7}";
ImpersonationLevel = 1;
PerUserInitialization = "FALSE";
};
instance of __PropertyProviderRegistration
{
Provider =$PropProv2;
SupportsPut =TRUE;
SupportsGet =TRUE;
};
//Delete old class information
#pragma deleteclass("LastRealUser",NOFAIL)
//Define the Data Class
[DYNPROPS]
class LastRealUser
{
[KEY] string KeyName = "";
string DefaultUserName;
};
//Define the Instance of the Data Class
[DYNPROPS]
instance of LastRealUser
{
KeyName="DefaultUserName";
[PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Winlogon|DefaultUserName"),
Dynamic,Provider("RegPropProv")] DefaultUserName;
};
//Define the Reporting Class
#pragma namespace("\\\\.\\ROOT\\CIMV2\\SMS")
[SMS_Report(TRUE),SMS_Group_Name("Last Real
User"),SMS_Class_ID("Microsoft|LastRealUser|1.0")]
class LastRealUser : SMS_Class_Template
{
[SMS_Report(TRUE),KEY] string KeyName;
[SMS_Report(TRUE)] string DefaultUserName;
};
//------------------------------------------------------------------------------------------------------------------
//End of Time LastRealUser Information
//------------------------------------------------------------------------------------------------------------------
.
- Follow-Ups:
- Prev by Date: ITMU - Update on a schedule?
- Next by Date: Re: Help with extending MOF to add Registry info - SMS 2003
- Previous by thread: ITMU - Update on a schedule?
- Next by thread: Re: Help with extending MOF to add Registry info - SMS 2003
- Index(es):