Share via

regtomof error 0x80044002

Philip George 1 Reputation point
2022-04-10T13:35:32.33+00:00

Need your help I’m trying to get the inventory of the registry using regtomof tool and I’m getting the below error message for both the mof can you guide me on what I’m doing wrong.

Configuration Mof

// RegKeyToMOF by Mark Cochrane (with help from Skissinger, SteveRac, Jonas Hettich, Kent Agerlund & Barker)

// this section tells the inventory agent what to collect

// 4/9/2022 8:42:49 PM

pragma namespace (\\.\root\cimv2)

pragma deleteclass("GoogleUpdate", NOFAIL)

[DYNPROPS]

Class GoogleUpdate

{

[key] string KeyName;

Uint32 Update{8A69D345_D564_463C_AFF1_A69D9E530F96};

Uint32 AutoUpdateCheckPeriodMinutes;

Uint32 UpdateDefault;

String TargetVersionPrefix{8A69D345_D564_463C_AFF1_A69D9E530F96};

};

[DYNPROPS]

Instance of GoogleUpdate

{

KeyName="RegKeyToMOF";

[PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|Update{8A69D345-D564-463C-AFF1-A69D9E530F96}"),Dynamic,Provider("RegPropProv")] Update{8A69D345_D564_463C_AFF1_A69D9E530F96};

[PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|AutoUpdateCheckPeriodMinutes"),Dynamic,Provider("RegPropProv")] AutoUpdateCheckPeriodMinutes;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|UpdateDefault"),Dynamic,Provider("RegPropProv")] UpdateDefault;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|TargetVersionPrefix{8A69D345-D564-463C-AFF1-A69D9E530F96}"),Dynamic,Provider("RegPropProv")] TargetVersionPrefix{8A69D345_D564_463C_AFF1_A69D9E530F96};

};

SMS_MOF

// RegKeyToMOF by Mark Cochrane (with help from Skissinger, SteveRac, Jonas Hettich, Kent Agerlund & Barker)

// this section tells the inventory agent what to report to the server

// 4/9/2022 8:42:49 PM

pragma namespace (\\.\root\cimv2\SMS)

pragma deleteclass("GoogleUpdate", NOFAIL)

[SMS_Report(TRUE),SMS_Group_Name("GoogleUpdate"),SMS_Class_ID("GoogleUpdate")]

Class GoogleUpdate: SMS_Class_Template

{

[SMS_Report(TRUE),key] string KeyName;

[SMS_Report(TRUE)] Uint32 Update{8A69D345_D564_463C_AFF1_A69D9E530F96};

[SMS_Report(TRUE)] Uint32 AutoUpdateCheckPeriodMinutes;

[SMS_Report(TRUE)] Uint32 UpdateDefault;

[SMS_Report(TRUE)] String TargetVersionPrefix{8A69D345_D564_463C_AFF1_A69D9E530F96};

};

I am getting the below error

PS D:\Users\pgeorg01\Desktop\New folder\new> mofcomp.exe -check .\GoogleConfig.mof

Microsoft (R) MOF Compiler Version 10.0.18362.1

Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.

Parsing MOF file: .\GoogleConfig.mof

.\GoogleConfig.mof (7): error SYNTAX 0X80044002: Expected semicolon or '='

Compiler returned error 0x80044002

And is there any other way to get this done, then extending the hardware inventory?

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 49,441 Reputation points Microsoft External Staff
    2022-04-12T08:39:10.527+00:00

    Hi, @Philip George

    Thank you for posting in Microsoft Q&A forum.

    According to the error message, it seems the 7 line has a syntax problem.
    The 7 line should be:
    [SMS_Report(TRUE)] Uint32 Update{8A69D345_D564_463C_AFF1_A69D9E530F96};
    I guess the curly brackets caused the issue, you may changed it to:
    [SMS_Report(TRUE)] Uint32 Update;

    And change [SMS_Report(TRUE)] String TargetVersionPrefix{8A69D345_D564_463C_AFF1_A69D9E530F96}; to [SMS_Report(TRUE)] String TargetVersionPrefix;

    And change the corresponding part in instance section.

    Configuration Mof

    pragma namespace (\.\root\cimv2)

    pragma deleteclass("GoogleUpdate", NOFAIL)

    [DYNPROPS]

    Class GoogleUpdate

    {

    [key] string KeyName;

    Uint32 Update;

    Uint32 AutoUpdateCheckPeriodMinutes;

    Uint32 UpdateDefault;

    String TargetVersionPrefix;

    };

    [DYNPROPS]

    Instance of GoogleUpdate

    {

    KeyName="RegKeyToMOF";

    [PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|Update{8A69D345-D564-463C-AFF1-A69D9E530F96}"),Dynamic,Provider("RegPropProv")] Update;

    [PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|AutoUpdateCheckPeriodMinutes"),Dynamic,Provider("RegPropProv")] AutoUpdateCheckPeriodMinutes;

    [PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|UpdateDefault"),Dynamic,Provider("RegPropProv")] UpdateDefault;

    [PropertyContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update|TargetVersionPrefix{8A69D345-D564-463C-AFF1-A69D9E530F96}"),Dynamic,Provider("RegPropProv")] TargetVersionPrefix;

    };

    SMS_MOF

    pragma namespace (\.\root\cimv2\SMS)

    pragma deleteclass("GoogleUpdate", NOFAIL)

    [SMS_Report(TRUE),SMS_Group_Name("GoogleUpdate"),SMS_Class_ID("GoogleUpdate")]

    Class GoogleUpdate: SMS_Class_Template

    {

    [SMS_Report(TRUE),key] string KeyName;

    [SMS_Report(TRUE)] Uint32 Update;

    [SMS_Report(TRUE)] Uint32 AutoUpdateCheckPeriodMinutes;

    [SMS_Report(TRUE)] Uint32 UpdateDefault;

    [SMS_Report(TRUE)] String TargetVersionPrefix;

    };


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.