cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
heybobby1
Engaged Sweeper III
Sometimes Lansweeper cannot report on installed Windows updates due to the WMI query for this failing. I want to share a fix for this.

The problem

You notice one or more of the following

When running “wmic qfe list” an error is reported or recent updates are not in the list but they are installed i.e. they appear in the Windows Update history in the GUI.

When running “sfc /scannow” it reports corrupt system files.

When running “dism /online /cleanup-image /restorehealth” it reports an error in a package.


The solution

Identify corrupt Windows updates and remove them.

Open the CBS log file located in C:\Windows\Logs\CBS\cbs.log and look for any packages with errors. For example "Mark store corruption flag because of package: Package_for_KB3083324..."

This is the process I follow to remove corrupt packages.

1. Identify the update flagged as corrupt in the CBS log and download it from

https://catalog.update.microsoft.com

2. Extract the contents by running the following in an elevated command prompt

Expand <UpdateFile> -f:* <ExtractedPath>

3. Uninstall the update by running the following in an elevated command prompt

Dism /online /remove-package /packagepath:<ExtractedPath><CabFile>


Once corrupted packages are removed, "wmic qfe list" should run without error. The same for the sfc and dism commands.
4 REPLIES 4
heybobby1
Engaged Sweeper III
I spotted there's now a KB from Microsoft for fixing corruption errors.

https://support.microsoft.com/en-gb/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness
heybobby1
Engaged Sweeper III
I've had more success fixing WMI issues caused by corrupt updates.

The problem

When running "wmic qfe list" the following is reported "No Instance(s) Available".

The solution for Windows 10

Run “dism /online /cleanup-image /restorehealth”

The solution for Windows 7

Download and run the System Update Readiness Tool, aka CheckSUR, from: https://support.microsoft.com/en-gb/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness

CheckSUR will check the package store and try to fix any corrupted packages. Sometimes payloads are missing in which case you need to download these and supply them to CheckSUR.

This is the process to do that:

1. Run CheckSUR.

2. Run "wmic qfe list". If "No Instance(s) Available" is still reported, proceed to number 3.

3. Open the CheckSUR log located at "%SYSTEMROOT%\Logs\CBS\CheckSUR.persist.log" and identify update files flagged as "Unavailable repair files" (you'll find these at the very bottom of the log).

4. Download the update(s) from

https://catalog.update.microsoft.com

5. Copy the downloaded .msu update files to "%SYSTEMROOT%\CheckSUR\packages" (create the packages folder if it doesn't exist).

6. Run CheckSUR once more.

7. Run "wmic qfe list" again. Hopefully the issue is now fixed but if not check the CheckSUR log to see what the issue could be.


Source(s):

https://blogs.technet.microsoft.com/askperf/2012/06/29/two-minute-drill-win32_quickfixengineering-no-instances-available/

https://blogs.technet.microsoft.com/joscon/2010/05/26/using-checksur-and-update-packages-to-fix-corruption/
heybobby1
Engaged Sweeper III
You're welcome.
Esben_D
Lansweeper Employee
Lansweeper Employee
Thanks for sharing!