How to Repair WMI
When Q starts, it talks to the Windows Management Instrumentation service (WMI). This is a core part of Windows that lets third-party programs query information about your computer's hardware. Q uses this as part of its licensing scheme.
WMI is unfortunately quite fragile and may break as a result of:
- system upgrades
- running out of hard disk space
- memory or other hardware problems
Diagnosing WMI Problems
Open a command prompt (see how-to), and enter the following commands, pressing Enter after each one:
wmic path win32_physicalmemory get capacity
wmic path win32_physicalmedia get serialnumber
wmic nic get MACAddress, PNPDeviceID
You should see results like the following:
C:\Users\Q>wmic path win32_physicalmemory get capacity Capacity 4294967296 4294967296 C:\Users\Q>wmic path win32_physicalmedia get serialnumber SerialNumber E2AB1Z8O 30026A724406875B Z1IK30DPKAEZ C:\Users\Q>wmic nic get MACAddress, PNPDeviceID MACAddress PNPDeviceID ROOT\KDNIC\0000 01:00:87:00:F3:18 ROOT\NET\0000 14:BA:E3:11:8B:AE PCI\VEN_10EC&DEV_8198&SUBSYS_84321943&REV_06\4&1D7623B1&0&00E2
If you see this error message, please follow the steps in Allowing Permission for WMI Queries below:
ERROR: Description = Access denied
If you see any other error message, for any of the commands, you need to repair the WMI repository. Follow the steps in the next section.
Repairing the WMI Repository
The following steps have been taken from a Microsoft guide on repairing the WMI repository that has been tested by Q support and worked on a Windows 10 machine whose repository was corrupted by memory problems.
- Launch the Command Prompt as an Administrator by searching for Command Prompt, then right-clicking on it and selecting Run as administrator:
- Type this command and press Enter:
- Make a note of the error message you see. A good WMI repository will output the line WMI repository is consistent - if you see this specific message, then perhaps your WMI Repository is not corrupt, and instead you have a malfunctioning system device or device driver - please see the below section Troubleshooting or resetting your PC. Otherwise if you do see an error message, proceed with the next steps.
- Type this command (which will attempt to repair the WMI repository) and press Enter:
- Now type the verification command again and press Enter to see if it worked:
- If you see the message WMI repository is consistent then the repair worked. Otherwise, proceed with the next step.
- Type this command and press Enter:
- You should see the message WMI Repository has been reset. If you see an error message instead, make a note of it.
- Reboot your computer, and then open the Command Prompt again and run the verification command again, like at step 2.
Once you have tried these steps, try the diagnosis commands again under the heading Diagnosing WMI Problems. If they work, you successfully repaired the WMI repository.
Troubleshooting or resetting your PC
If the commands in Repairing the WMI Repository did not work and you still experience errors, one of the system devices in your computer may not be working properly or some of Windows' system files may be corrupt. Please try:
- Use the troubleshooter tools built into Windows: https://support.microsoft.com/en-us/windows/use-a-fix-it-tool-with-windows-10-cc3cb85b-91d7-7e56-8ce1-db50b4d18d0b
- Reset your PC: https://support.microsoft.com/en-gb/windows/recovery-options-in-windows-31ce2444-7de3-818c-d626-e3b5a3024da5#bkmk_reset_pc
Allowing Permission for WMI Queries
Your user account has been denied permission to query the WMI repository. Your IT administrator needs to perform the following steps to allow you to query the WMI repository.
Your IT administrator needs to perform the following on your PC.
- Run (Windows key + R) WMImgmt.msc
- Right-click on WMI Control (Local) and select Properties
- Go to the Security tab
- Select the Root node
- Click the Security button
- Click Advanced
- Click Add
- Click Select a principal, and then select the user (or group) that needs to access WMI and click OK.
- Set Type to Allow
- Set Applies to to This namespace and subnamespaces
- Check Enable Account and Read Security.
- Ensure that the permissions match the screenshot shown on the right. Click OK
- You should now be back in the dialog with the title Advanced Security Settings for Root. Please note that any Deny permissions will take precedence over Allow permissions. So you will need to remove or edit any deny permissions:
- Look for any permission entries that show Deny in the Type column.
- Remove these permission entries or edit them so they do not apply to the user, or that the Enable Account and Read Security permissions are not denied.
- Click OK.
- Click OK on the Security for Root dialog.
- Click OK on the WWI Control (Local) Properties dialog.
- Log in to Windows as the user that needs to use Q.
- Run the WMI query commands in the Diagnosing WMI Problems section above to confirm permission is now allowed. If permission is still not allowed, you may have selected the wrong user/group in the earlier step (Select a principal) or a Deny permission may still be overriding the Allow permission (Deny takes precedence over Allow).