WMI: Repository Corruption

Scenario:

Windows Management Instrumentation is failing due to the repository being corrupted.

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. If the Repository becomes corrupted, then the WMI service will not be able to function correctly.

 

Issue:

If WMI is corrupted, you can receive various errors and symptoms, depending on what activity is being done. Below is one of the most common errors and symptoms that could indicate that the repository is corrupted when a user is trying to launch RIL/Retail Pro 9:

When running RIL/Retail Pro 9 the following error will appear:

 " Initialization failed or Retail Pro is unable to communicate with the database. Please ensure your database has been started or contact your technical support for additional assistance."

A dialogue error pop-up window. Error  Initialization failed or Retail Pro is unable to communicate with the database. Please ensure your database has been started or contact your technical support for additional assistance.  The license server is down or has experienced a serious error. Please contact your system administrator for assistance. The workstation name is not properly formatted. Workstation names may contain letters (a-z, A-Z), numbers (0-9), and hyphens (-).

After confirming all services are running and database is in open state, the first thing to check is the state of WMI. If it is corrupted, then it should match the following screenshot:

 

 - Failed to initialize all required WMI classes.
 - win32_Processor: WMI: Invalid classes
 - win32_WMISetting: WMI: Invalid class
 - security info: Successful
 - win32_operatingsystem: WMI: invalid class

WMI Control Properties  General | Backup/Restore | Security | Advanced  This dialog allows you to get general information about the computer.  Failed to initialize all required WMI classes.  Win32_Processor: WMI: Not found  Win32_WMISetting: WMI: Not found  Security information: Successful  Win32_OperatingSystem: WMI: Not found

Question 1: Where to check WMI?

Right-click on Start Menu > Computer Management > Services and Applications > WMI Control > Right-click> Properties.
 

Question 2: How to reset the WMI Repository?

Courtesy of https://www.thewindowsclub.com/how-to-repair-or-rebuild-the-wmi-repository-on-windows-10

Open Command Prompt with elevated privileges.

  • Start > Type CMD > Right click > Run as administrator > Run the following commands as shown in the screenshot:

Windows Administrator Command Prompt window

Here are the commands that you should run step by step:

  1. >  sc config winmgmt start= disabled

  2. >  net stop winmgmt

  3. Do you want to continue this operation? (Y/N) [N]: y

  4. >  Winmgmt /salvagerepository %windir%\System32\wbem

  5. >  Winmgmt /resetrepository %windir%\System32\wbem

  6. >  sc config winmgmt start= auto

Now it is recommended to reboot the operating system.

Conclusion:

After rebooting, the ideal look of WMI should be as follow:

WMI Control Properties dialogue window showing a successfully connected computer and processor, OS, etc. It lists WMI location as windows system32 wbem

Right-click on Start Menu > Computer Management > Services and Applications > WMI Control > Right-click> Properties.

At this point, users should be able to launch and log into RIL/V9 without any issues/errors.

Advisory Note:

If you run into a repeated corruption issue in your environment with WMI, try to exclude the WBEM folder and all subfolders under it from AV scanning. AV scanning is known to cause corruption and other issues in WMI.

Here is the path of WBEM [C:\Windows\System32\wbem].

RPI highly recommends disabling Firewall/AV/UAC and setting DEP to essential Windows programs and services only.

Published on Aug 19, 2024 in Hardware & Devices

 

Find Another Article