Open atc0005 opened 3 years ago
There are 4 registry keys that will let you know if there are pending updates. HopelessN00b was on the right track, though you have to go up one level to see the keys.
HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update
The keys you want are:
UpdatesAvailableForDownloadLogon - Updates pending download(important updates) UpdatesAvailableForInstallLogon - Downloaded updates pending install UpdatesAvailableWithUiLogon - Pending updates that need interaction to install UpdatesAvailableWithUiOrEulaLogon - Similar to above but you also have to accept a EULA
This should do the trick for your inventory software. Another one I tweak remotely is; NextDetectionTime This way if it is not going to check WU for a while or a security patch is out that I want to grab, I edit the date to today and the current time +1 minute.
Not sure of viability for this specific plugin (this one is about WU "problems"), but some needed hooks may be there.
For example, check for paused Windows Updates. The default behavior could be to trigger a state change if paused, but allow this to "pass" if the expiration is within 24 hours?
What appears to be related keys on
Windows 10 Version 20H2
:HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings\PauseUpdatesExpiryTime
HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings\PauseFeatureUpdatesStartTime
HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings\PauseFeatureUpdatesEndTime
HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings\PauseQualityUpdatesStartTime
HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings\PauseQualityUpdatesEndTime