Inv_SW_Patch_Windows data class is empty.

book

Article ID: 169758

calendar_today

Updated On:

Products

Inventory Solution

Issue/Introduction

Standard inventory on managed computers collects more than 100 predefined data classes. Inv_SW_Patch_Windows belongs to Hardware group of data classes. You may experience a situation when an inventory task has completed successfully but Inv_SW_Patch_Windows data class is empty.
 

The following messages can be seen in the Agent logs: 
The inventory for [SW Patch Windows] is an empty string, will create an empty NSI.

OR

Entry 1:

Gathering inventory for SW Patch Windows
-----------------------------------------------------------------------------------------------------
Date: 4/5/2021 1:41:25 PM, Tick Count: 34813011 (09:40:13.0110000), Size: 275 B
Process: AeXNSAgent.exe (2516), Thread ID: 4640, Module: InvAgent.dll
Priority: 8, Source: Inventory::Run

Entry 2:

Gathering OS Patches Information
-----------------------------------------------------------------------------------------------------
Date: 4/5/2021 1:41:25 PM, Tick Count: 34813011 (09:40:13.0110000), Size: 278 B
Process: AeXNSAgent.exe (2516), Thread ID: 4640, Module: InvAPI.dll
Priority: 8, Source: CCEOSUpdatesInfo::DoProcess

Entry 3:

GetVistaOSupdates Fails
-----------------------------------------------------------------------------------------------------
Date: 4/5/2021 1:58:27 PM, Tick Count: 35835005 (09:57:15.0050000), Size: 269 B
Process: AeXNSAgent.exe (2516), Thread ID: 4640, Module: InvAPI.dll
Priority: 8, Source: CCEOSUpdatesInfo::DoProcess

Entry 4:

Failed to collect inventory
-----------------------------------------------------------------------------------------------------
Date: 4/5/2021 1:58:27 PM, Tick Count: 35835005 (09:57:15.0050000), Size: 277 B
Process: AeXNSAgent.exe (2516), Thread ID: 4640, Module: InvAPI.dll
Priority: 8, Source: InvAPI::GetInventoryInformation

Cause

QuickFixEngineering table and Inv_SW_Patch_Windows data class are populated by Inventory solution. 

 

The following query is used to populate the Inv_SW_Patch_Windows data class: 

select HotFixID,InstalledOn,InstalledBy,Description,ServicePackInEffect,FixComments from Win32_quickFixEngineering.

Prior to ITMS 8.1 RU2, The query has a predefined 2 minutes timeout. The data class is populated with empty data if it takes more than 2 minutes to complete the query. 

Post ITMS 8.1 RU2, we have now a 10 minutes timeout. If query is not completed in 10 minutes, we return false and do not report anything.

Environment

ITMS 7.6 (all hotfixes) / ITMS 8.0 (all hotfixes) / 8.1 RU1

ITMS 8.1 RU2 and later

Resolution

For environments ITMS 8.1 RU2 and later:
 
1. On one of those systems that is not populating Inv_SW_Patch_Windows data class, run
select HotFixID,InstalledOn,InstalledBy,Description,ServicePackInEffect,FixComments from Win32_quickFixEngineering
when tested from WBEMTEST
 
Note:
Another way to test how long takes to return the content from Win32_quickFixEngineering is running this command from powershell:
Get-CimInstance -ClassName Win32_QuickFixEngineering -Property *
 
If querying Win32_quickFixEngineering takes more than 10 minutes, we suggest to try to uninstall all superseded updates, and then re-run the wmi query again to test how long takes after that. Here are some examples of how to cleanup those systems: 
  • Win8 and newer OSes support the following cmd:

Dism /online /Cleanup-Image /StartComponentCleanup

  • Win7/2008r2 require some script to achieve similar results:

FOR /F "usebackq" %i in (`DISM /online /Get-Packages /Format:Table /English | find /I "Superseded"`) do DISM /online /norestart /Remove-Package /PackageName:%i /English /Quiet

The example above is for manual running only. Running in a batch script requires escaping of '%' and '|'

 
 
As well, you could create a Run Script Task and target those systems:

1. Use the content of the attached "Uninstall_superseded_updates.txt" in your task.

2. Task type: Command Script. Make sure that 'script type' is not set to vbs or any other than 'command script'.

3. Copy and Paste the attached script in your task. Run it against one of your affected client machines.

4. Reboot is required to finish updates uninstallation.

 
 
 
------------------------------------------------------
If you have still have ITMS 8.1 RU1 installed (please refer to ITMS EOL Schedules)
- see the following message in Altiris log filesThe inventory for [SW Patch Windows] is an empty string, will create an empty NSI and
- the query execution takes more than 2 minutes to complete (select HotFixID,InstalledOn,InstalledBy,Description,ServicePackInEffect,FixComments from Win32_quickFixEngineering), when tested from WBEMTEST

then 
- ITMS 8.0 HF2 users should download and install a new Inventory plug-in from "4096755_Inv_Agent_8.0_HF2.zip",
- ITMS 8.0 HF4 users should download and install a new Inventory plug-in from "4100813_Inv_Agent_8.0_HF4.zip",
ITMS 8.0 HF6 users should download and install a new Inventory plug-in from INFO4241 (when the fix is public),
- ITMS 8.1 RU1 users should download and install RU2 (when is public ~ 07/24/2017).
 
HOW TO INSTALL THIS POINTFIX
1. Retrieve files from the archive to the NS hard drive.
2. Run as administrator “PFInstaller.exe”, click "Install Files" button.
3. Run scheduled tasks "NS.Package Refresh" and then "NS.Package Distribution Point Update Schedule.
4. Upgrade Inventory Plug-in using cloned default “Inventory Plug-in Upgrade’ policy. Default upgrade policy may not work in case if plug-in has been already upgraded to version 8.x using this policy with Run ASAP option.
 
New versions
Inventory Solution 8.0 HF2 - 8.0.2330
Inventory Solution 8.0 HF4 -  8.0.3345
Inventory Solution 8.0 post-HF6 - 8.0.3533
Inventory Solution 8.1 RU2 - 8.1.5267

Attachments

1618319463167__Uninstall_superseded_updates.txt get_app
4100813_Inv_Agent_8.0_HF4.zip get_app
4096755_Inv_Agent_8.0_HF2.zip get_app