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
ITMS 7.6 (all hotfixes) / ITMS 8.0 (all hotfixes) / 8.1 RU1
ITMS 8.1 RU2 and later
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.
Dism /online /Cleanup-Image /StartComponentCleanup
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 '|'
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.