none
WMI repository broken

    Question

  • I've done a clean install of Windows 8 and updated to 8.1 via the store update on a new SSD about 1 month ago.
    Everything was fine back then. Regarding hardware or settings I've changed nothing since then.

    Since about 1 week I've got some serious problems related to WMI:

    • event id 28
      At each system boot an error of event id 28 gets logged which points at the WMI core components.
      Seems that the WMI-Installation is somehow broken.
    • event id 3
      As a consequence of the WMI error windows security center reports this error. Seems that windows needs WMI to check for running antivirus programs which fails. This leads to a notification in the taskbar which tells me that there is no active antivirus software (which is wrong).
    • event id 43
      Furthermore I get this warning which says something like "there was an connecting to namespace "\\.\root\cimv2" through WMI: 0x80041001" (translated from german)

    As a sidenote: the WMI service is running at startup and can be turned off or restarted with no problem.

    I concluded that the problem must be WMI, so I tried to fix it:

    • WMI repository (refresh via commands)
      winmgmt /resetrepository or winmgmt /salvagerepository didn't help
    • WMI repository (manual refresh)
      Renaming the repository folder and let windows recreate it after reboot didn't help either

      I also found a batch script that should recreate the repository which also didn't work.
      (some for-commands for every dll, mof and some other file type; can't remember exactly)
    • System restore
      Gives me an "unknown error at system recovery" 0x80070057.
      Although I don't think this would help much, as I've only got 1 restore point thats about 2 days old.
      As I've said earlier I didn't change anything os wise.
    • System refresh
      Prompts me to insert an installation medium which I don't had in the first place (as stated earlier I bought windows 8 on disk and updated to 8.1 via the store update, so I don't have any disks for 8.1).

      So I downloaded the ISO for 8.1 by exploiting the windows 8 downloader glitch (cancel download for 8 and then start downloading 8.1).

      Even with this ISO I still could not refresh my system - got an error which I don't know anymore.
    • WMI connection
      I also found a command which opens a tool where you can try to connect to the WMI repository.
      This gives me the same error as stated under "event id 43" (see above).

    Are there any other ways to repair WMI or the repository?
    I don't want to do a complete system refresh again since the system otherwise runs perfectly fine...

    Would appreciate every tip you could give me!
    If you need some more details or system logs just ask for it and I'll provide them!

    PS: Please bear with me that I can't give you full details on every solution I tried... I did this at 3 o clock in the morning and forgot to take notes / make screenshots of everything.
    Sunday, December 15, 2013 1:20 PM

All replies

  • No one that can help me here?

    Edit: Just ran sfc /scannow and uploaded the cbs.log for more information.

    http://s000.tinyupload.com/index.php?file_id=13365929674172032980

    • Edited by Gishan Wednesday, December 18, 2013 6:11 PM
    Wednesday, December 18, 2013 5:58 PM
  • Hi,

    Based on my experience, this issue may be related to driver issue. I would like to suggest checking the drivers you installed are compatible with Windows 8.1.

    Since all drivers in Windows update are produced from manufacturer and then after passing the Windows Logo Program testing, then they can be distribute onto update,

    that should be little delayed. I suggest we download the latest driver applied to Windows 8.1 from manufacturer site.

    Please also disable temporary disable the antivirus and firewall for a test.

    I think, you may want to refer to the blog below to check the issue:

    WMI: Remote query for Win32_Product class results in ‘Generic Failure’ error (0x80041001)

    http://blogs.msdn.com/b/wmi/archive/2009/09/16/wmi-remote-query-for-win32-product-class-results-in-generic-failure-error-0x80041001.aspx

    Hope it helps.

    Regards,


    Kelvin hsu
    TechNet Community Support

    Friday, December 20, 2013 8:25 AM
    Moderator
  • When I installed Windows 8.1 I downloaded the latest driver for every single device.
    I handpicked them and checked for compatibility with 8.1 - this took me hours.

    How can I tell which driver causes this issue?
    Personally I don't think that this is caused by a driver...

    I tried to fix the WMI repository by:

    • winmgmt /verifyrepository
      errorcode: 0x80041001

    • winmgmt /salvagerepository
      errorcode: 0x80041001

    • winmgmt /resetrepository
      errorcode: 0x80041001

    • hardreset by switching the service off and renaming the old repository-folder under %windir%\system32\webm\repository, then reactived the service and restarted
      => still the same eventlog and same errorcode with every winmgmt command...
    btw: sfc /verifyonly or sfc /scannow dont show any corrupted files
    • Edited by Gishan Friday, December 20, 2013 3:32 PM
    Friday, December 20, 2013 3:31 PM
  • How can I tell which driver causes this issue?

    You mentioned a code related to AV previously.  How about combining both clues and guess that it's one for your (undisclosed?) AV?   <eg>



    Robert Aldwinckle
    ---

    Friday, December 20, 2013 7:31 PM
  • How can I tell which driver causes this issue?

    You mentioned a code related to AV previously.  How about combining both clues and guess that it's one for your (undisclosed?) AV?   <eg>



    Robert Aldwinckle
    ---

    Sorry, what do you mean with 'AV'?

    If you mean Antivirus that has nothing to do with this.
    I don't have any third party Antivirus software installed - I'm only using the Windows 8.1 Defender. My problem is the broken WMI repository that I couldn't repair.

    • Edited by Gishan Saturday, December 21, 2013 11:46 AM
    Saturday, December 21, 2013 11:44 AM
  • How can I tell which driver causes this issue?

    You mentioned a code related to AV previously.  How about combining both clues and guess that it's


     I'm only using the Windows 8.1 Defender.

    Looks like there is a driver for it.

    <cmd_output>

    C:\>wmic.exe SysDriver where (State="Running") get Description, Pathname  | find /i "defe"
    Windows Defender Mini-Filter Driver                                  C:\WINDOWS\system32\drivers\WdFilter.sys

    </cmd_output>



    Robert Aldwinckle
    ---


    Saturday, December 21, 2013 5:31 PM
  • How can I tell which driver causes this issue?

    You mentioned a code related to AV previously.  How about combining both clues and guess that it's


     I'm only using the Windows 8.1 Defender.

    Looks like there is a driver for it.

    <cmd_output>

    C:\>wmic.exe SysDriver where (State="Running") get Description, Pathname  | find /i "defe"
    Windows Defender Mini-Filter Driver                                  C:\WINDOWS\system32\drivers\WdFilter.sys

    </cmd_output>



    Robert Aldwinckle
    ---


    The command is not working for me...
    I still dont get it what this has to do with my problem.

    It doesn't matter if I switch Windows Defender on or off.
    The WMI repository still is defective. Windows logs an error because it can not detect if Defender is running or not (which definitely is). And this is caused by the broken WMI repository.

    So I have to repair the repository somehow - that is my problem.

    Would be glad if someone can help me out!

    Saturday, December 21, 2013 7:24 PM
  • Still got no working solution for this...
    Is there anyone who can help?

    Friday, December 27, 2013 6:52 AM
  • Still waiting for someone to help me out... :/

    Saturday, January 4, 2014 10:48 AM
  • it sounds like you have tried many steps that I would have recommended, but, maybe not in the exactly correct order?

    http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx

    Warning: Rebuilding the WMI repository has resulted in some 3rd party products not working until their setup is re-run & their MOF re-added back to the repository.

    If Winmgmt /salvagerepository or Winmgmt /resetrepository does not resolve the issue, then manually rebuild repository:
    1.Change startup type to Window Management Instrumentation (WMI) Service to disabled
    2.Stop the WMI Service; you may need to stop IP Helper Service first or other dependent services before it allows you to stop WMI Service
    3.Rename the repository folder:  C:\WINDOWS\system32\wbem\Repository to Repository.old
    4.Open a CMD Prompt with elevated privileges
    5.CD windows\system32\wbem
    6.for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
    7.Set the WMI Service type back to Automatic and start WMI Service
    8.cd /d c:\  ((go to the root of the c drive, this is important))
    9.for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
    10.Reboot


    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    • Proposed as answer by Trones Saturday, March 29, 2014 11:41 PM
    Saturday, January 4, 2014 11:26 AM
  • At step 6 I get an error "%%s" can not be used at this position (1:1 translation from german error message).

    I copy&pasted the command you posted without any leading or trailing spaces.
    Single percent signs seem to do the job. regsrv32 ist getting executed for all dlls.
    So I went on with the other steps.

    At step 9 I get a lot of errors.

    This is just one of the many (probably 100+) of the messages I get. Unfortunately I don't know how to redirect the output for all executed commands into a textfile.

    folgende MOF-Datei wird analysiert: c:\Windows\WinSxS\x86_netfx4-adonetdiag_dll_b03f5f7f11d50a3a_4.0.9600.16384_none_f0531fc09cfbc8a4\adonetdiag.mof
    Die MOF-Datei wurde erfolgreich verarbeitet.
    Daten werden im Repository gespeichert...
    Fehler beim ™ffnen des Namespaces fr Objekt 1 in Zeilen 14 - 16:
    Compiler hat folgenden Fehler zurckgegeben: 0x80041001Fehlercode: 0x80041001, Einrichtung: WMI
    Beschreibung: Allgemeiner Fehler

    After rebooting I still get the described errors logged in the event viewer. :<

    • Edited by Gishan Saturday, January 4, 2014 6:06 PM
    Saturday, January 4, 2014 5:49 PM
  • At step 6 I get an error "%%s" can not be used at this position (1:1 translation from german error message).

    I copy&pasted the command you posted without any leading or trailing spaces.
    Single percent signs seem to do the job. regsrv32 ist getting executed for all dlls.
    So I went on with the other steps.

    At step 9 I get a lot of errors.

    This is just one of the many (probably 100+) of the messages I get. Unfortunately I don't know how to redirect the output for all executed commands into a textfile.

    folgende MOF-Datei wird analysiert: c:\Windows\WinSxS\x86_netfx4-adonetdiag_dll_b03f5f7f11d50a3a_4.0.9600.16384_none_f0531fc09cfbc8a4\adonetdiag.mof
    Die MOF-Datei wurde erfolgreich verarbeitet.
    Daten werden im Repository gespeichert...
    Fehler beim ™ffnen des Namespaces fr Objekt 1 in Zeilen 14 - 16:
    Compiler hat folgenden Fehler zurckgegeben: 0x80041001Fehlercode: 0x80041001, Einrichtung: WMI
    Beschreibung: Allgemeiner Fehler

    After rebooting I still get the described errors logged in the event viewer. :<

    Apologies!

    [step 6]: %%S is only valid when used in a batch/script, so, %s (as you found) is correct.
    [step 9]: some warnings/errors are expected in this step, and are typically ok to ignore.

    It seems that during the rebuild of your WMI repository, the corruption is being re-inserted;
    0x80041001 = WMI Generic Failure

    The only further steps I might advise, are to perform a complete clean install of Windows :(

    [I did observe that in your earlier posting of CBS.log, a lot of filesystem SDDL and "no owner" warnings.]
    [I wonder if, since the issues started when you installed your SSD, is your SSD integrity healthy?]
    There may be further error details, logged in the Windows event logs, which might correlate?


    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    Saturday, January 4, 2014 9:48 PM
  • The SSD seems fine - examined SMART values with Samsung Magician and Crystal DiskInfo and all are OK.

    Seems that I've got no choice and need to do a complete reinstall once again...
    I really hope that this resolves the problem. But as I got the effect after a fresh installation I doubt it.

    Is there a way to install Windows 8.1 directly without having to install 8 and then update to 8.1?
    (without buying another Windows 8.1 license?)

    Sunday, January 5, 2014 12:32 PM
  • About the Issue your having. I'm wondering what caused this to happen.

    0x80041001Error code: 0x80041001

    Errors originating in DCOM. DCOM configuration for operations to a remote computer are incorrect or improper registered app.

    did you try

    sfc /scannow

    http://technet.microsoft.com/en-us/library/cc731901.aspx

    http://technet.microsoft.com/en-us/library/cc771387.aspx




    • Edited by colakid Sunday, January 5, 2014 1:54 PM
    Sunday, January 5, 2014 12:57 PM
  • Yes, I did try sfc /scannow (even with all the other params).
    The cbs.log is linked in my second post in this thread.

    Sunday, January 5, 2014 4:29 PM
  • I see sry I do not click any links so easily, I've set my mind to totally by pass links totally. They have to be links I know or trust

    Edit: I used the post that showed the possible area. That code as I said is dcom address any dcom could cause this issue. I do not know how to rebuild the data base for dcom or ccom. I know how to refresh if that helps.




    • Edited by colakid Sunday, January 5, 2014 4:52 PM
    Sunday, January 5, 2014 4:39 PM
  • I'm glad for every possible solution so that I don't have to format. :)

    Would be nice if you could share how to refresh.

    Sunday, January 5, 2014 7:00 PM
  • I will but first I'm testing something that may help your problem it will be in about 10 mins or so
    Sunday, January 5, 2014 7:14 PM
  • ok run this is admin cmd

    DISM /Online /Cleanup-Image /RestoreHealth


    I simulated your error and I fix this by running the command
    • Edited by colakid Sunday, January 5, 2014 7:36 PM
    Sunday, January 5, 2014 7:18 PM
  • Ok, so it seems the DCOM error (event id 10010) is gone after running the command you suggested.
    After a reboot this error is not logged.

    But unfortunately the WMI repository is still broken.
    I tried to fix it by going through the steps Don suggested, but that leeds to the DCOM error to reappear after a reboot.

    So the remaining error is still event id 28 / error number 0x80041001

    Thank you for your support so far!
    It seems that we are comming closer to a solution - at least we eliminated 1 error :)

    Do you have any other ideas what I can do to repair WMI?

    PS: I'd like to vote Don's and colakid's posts as helpful (as Don's signature suggestes) but I can't find an option for that. There is only "Mark as answer".

    Monday, January 6, 2014 8:28 AM
  • is your bios up to date, is the firmware of your ssd up to date? Are you using Intel chipset.

    Update bios, update firmware, uninstall Intel Management Engine Driver

    • Edited by colakid Monday, January 6, 2014 11:15 AM
    Monday, January 6, 2014 10:54 AM
  • following MOF file is parsed: c:\Windows\WinSxS\x86_netfx4-adonetdiag_dll_b03f5f7f11d50a3a_4.0.9600.16384_none_f0531fc09cfbc8a4\adonetdiag.mof the MOF file has been successfully processed.
    Data is stored in the repository.
    Failed the ™ open the namespace for object 1 in lines 14-16: compiler has the following errors to the ckgegeben: 0x80041001Fehlercode: 0x80041001, facility: WMI Description: General error

    Failed the ™ open the namespace for object 1 in lines 14-16 so netfx4 which is netframe, has a permission error and wmi reported that error. WMI is working fine. Try this file I'm giving dotnetfx cleanup tool

    https://skydrive.live.com/redir?resid=A656E7391672EFDC%212260


    Edit run as admin

    Edit  object are found in component services

    http://technet.microsoft.com/en-us/library/hh825549.aspx

    • Edited by colakid Monday, January 6, 2014 1:10 PM
    Monday, January 6, 2014 12:28 PM
  • is your bios up to date, is the firmware of your ssd up to date? Are you using Intel chipset.

    Update bios, update firmware, uninstall Intel Management Engine Driver

    My BIOS, ssd firmware and all other drivers are up to date.
    Intel Management Engine 9.5.15.1730 is installed.

    I ran the cleanup tool you gave me but after rebooting the problem still persists. (event id 28)
    I don't know, but it doesn't have to be related to to .NET Framework. The log you interpreted is just a tiny excerpt of the whole log.

    When executing the following batch command (as suggested by Don / step 9) there are hundreds of errors logged. If you can tell me how to log them all in one file (or even in seperate files) I can show them to you.

    for /f %s in ('dir /s /b *.mof *.mfl') do mofcomp %s


    Monday, January 6, 2014 1:26 PM
  • uninstall intel management driver I had all kinds of errors with that running
    Monday, January 6, 2014 2:13 PM
  • ok, uninstalled it but still got the error.
    Monday, January 6, 2014 3:54 PM
  • So the remaining error is still event id 28 / error number 0x80041001

    That error is the only one you mentioned, after using some of the fixes. That code is what I responded to because you said all was fixed except this one. This code is

    following MOF file is parsed: c:\Windows\WinSxS\x86_netfx4-adonetdiag_dll_b03f5f7f11d50a3a_4.0.9600.16384_none_f0531fc09cfbc8a4\adonetdiag.mof the MOF file has been successfully processed.
    Data is stored in the repository.
    Failed the ™ open the namespace for object 1 in lines 14-16: compiler has the following errors to the ckgegeben: 0x80041001Fehlercode: 0x80041001, facility: WMI Description: General error

    Failed the ™ open the namespace for object 1 in lines 14-16 so netfx4 which is netframe, has a permission error and wmi reported that error. WMI is working fine. Try this file I'm giving dotnetfx cleanup tool


    If that did not work I cant help any more
    • Edited by colakid Monday, January 6, 2014 7:05 PM
    Monday, January 6, 2014 7:04 PM
  • Hm, ok. Seems I have to reinstall again...

    Thank you nonetheless for your continued efforts!

    Monday, January 6, 2014 7:16 PM
  • reading all the post of other forums you asked this question I already know before I stepped in there were going to be no fixes, for your error.
    Monday, January 6, 2014 7:36 PM
  • I work in an environment that requires being able to read a great deal of information from WMI constantly. I have even tried completely removing the data repository and letting WMI start a new one and that does not even work.

    This fix works every time. 

    1. Open a microsoft powershell window 
      1. Type the following commands and press enter after each command
      2. net stop winmgmt
      3.  ren  c:\windows\system32\wbem\repository  c:\windows\system32\wbem\repository_old
      4. net start winmgmt 
      5. cd c:\windows\system32\wbem
      6. lodctr /r 
      7. Check and make sure all services are running.  A reboot is not required at this point, but it is the fastest way to assure that all services restart.

    Tuesday, April 30, 2019 3:40 PM