What is WMI repository?
The WMI Repository (%windir%System32WbemRepository ) is the database that stores meta-information and definitions for WMI classes; in some cases the repository also stores static class data as well. If Repository becomes corrupted, then the WMI service will not be able to function correctly.
What does Mofcomp EXE do?
By default, Mofcomp.exe stores the compiled classes in the root\default WMI namespace.
What causes WMI repository corruption?
If you’re getting that error this means that part of the operating system is broken. This is usually caused by partial (and failed) driver installation and/or “cleaner utilities”.
Where is the WMI repository located?
%WINDIR%\System32\wbem\Repository
The WMI repository is located at %WINDIR%\System32\wbem\Repository and the sum of all the files in that folder constitute the repository size.
How do I check my WMI repository?
Confirm WMI is broken
- Launch the WMI MMC snapin: go to Start -> Run -> type wmimgmt.msc.
- Right click WMI Control (Local) and click Properties.
- If WMI is working correctly, you will see Successfully connected window as shown below.
- If you see Invalid class or any other error message then WMI is not working properly.
Where is Mofcomp exe located?
The MOF Compiler is available in the %Windir%\System32\wbem directory.
How can WMI issues be resolved?
How to check WMI repository consistency
- Disable and stop the WMI service. sc config winmgmt start= disabled. (note the blank space before disabled)
- Run the following commands. Winmgmt /salvagerepository %windir%\System32\wbem. Winmgmt /resetrepository %windir%\System32\wbem.
- Re-enable the WMI service and reboot the machine.
Is WMI information stored in registry?
The registry keys for WMI are located in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM\.
How do I fix my WMI repository?
If the problem remains, then try the following steps to rebuild the repository:
- Disable and stop the WMI service.
- Rename the repository folder (located at C:\WINDOWS\System32\wbem\repository) to repository.
- Re-enable the WMI service.
- Reboot the server to see if the problem remains.
How do I know if my WMI repository is corrupted?
- Open an elevated command prompt.
- Verify the WMI repository is not corrupt by running the following command: winmgmt /verifyrepository. If the repository is not corrupted, a “WMI Repository is consistent” message will be returned. If you get something else, go to step 3.
- Run the following commands to repair WMI:
What is Wmiprvse exe process?
The wmiprvse.exe process is the WMI Provider host. It’s a part of what’s known as the Windows Management Instrumentation (WMI) component within Microsoft Windows.
What does SC exe stand for?
Microsoft’s command-line “Service Configuration Tool” program, named “sc.exe”, is in “C:\Windows\System32”. It allows administrative users to establish a program as a Windows service in the Service Control Manager (SCM) database and the Registry, either locally or remotely.
What is sc command used for?
SC is a command line program used for communicating with services and the Service Control Manager.
How to include a MOF file in the WMI repository?
To include this MOF file when the WMI Repository is automatically reconstructed, place the #PRAGMA AUTORECOVER statement on the first line of the MOF file. The MOF Compiler is available in the %Windir%\\System32\\wbem directory. You must specify the MOF file as the parameter of the MOF Compiler.
What is a managed object format (MOF) compiler?
The Managed Object Format (MOF) compiler parses a file containing MOF statements and adds the classes and class instances defined in the file to the WMI repository. MOF files are usually automatically compiled during the installation of the systems with which they are provided, but you can also compile MOF files by using this tool.
Where are AutoRecover MOF files stored in the registry?
The list of autorecover MOF files is stored in the registry key: HKEY_LOCAL_MACHINE SOFTWARE Microsoft WBEM CIMOM The MOF files listed in this registry entry must reside on the local computer because MOF files that use the autorecover command cannot recover MOF files located on a remote computer.
How do I compile a MOF file into another namespace?
In this case, the only way to compile the MOF into another namespace is to edit the MOF file and change the \\#**pragma namespace** command. A remote computer can be specified using \\\\\\\\machinename\\oot\\\\default. Requests that the compiler not make any changes to existing classes.