I deleted the Wbem folder and WMI not working :( please help RRS feed

  • Question

  • I deleted the Wbem folder in System32 becouse it was probably infected and devoured a lot of CPU :( I was scared becouse it's my new computer. Sorry for mistakes, I from Poland.
    Backup wbem folder?

    • Edited by MayerCeper Sunday, December 2, 2018 7:52 PM
    Sunday, December 2, 2018 7:50 PM

All replies

  • Hi MayerCeper,

    Thanks for your posting here.

    1.These are the files used for Windows Management Instrumentation, or WMI, which is Microsoft's implementation of Web-based Enterprise Management (WBEM). Those files are part of Windows and are used to query the state of the machine and other information. Any program you have that uses WMI to query for information will continue to work properly.

    2. we can rebuild this folder (C:\WINDOWS\System32\wbem\Repository) by using following CMD:

    a. Disable and stop the WMI service.
    sc config winmgmt start= disabled
    net stop winmgmt
    b. At a command prompt (cmd), change to the WBEM folder.
    cd %windir%\system32\wbem
    c. Rename the repository folder
    rename repository repository.old
    d. Re-enable the WMI service.
    sc config winmgmt start= auto
    e. Run the following command to manually recompile all of the default WMI .mof files and .mfl files
    cd %windir%\system32\wbem
    for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
    f. Reboot the system.

    3. For the third party programs' .mol files, .mfl files and .dll files, we have to reinstall  these programs

    Hope can help you.

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Monday, December 3, 2018 3:38 AM