Page 1 of 1

Prevent installation if pending reboot or updates are in progress

Posted: Thu Jun 11, 2020 6:36 am
by digibum
One of my setup features is MSSQL Server witch requires "clean" system. That means no pending reboot or Windows updates in progress.

Is there an easy way to detect if there is pending reboot or Windows update in progress?

I have already fount registry key, but later discoverd that there are many possible registry key that can require pending reboot.

Re: Prevent installation if pending reboot or updates are in progress

Posted: Thu Jun 11, 2020 1:03 pm
by FrancescoT
For what I know, it doesn't exist an easy way for detecting if Windows update is in progress.

You may have a look at the following links:
https://docs.microsoft.com/en-us/windows/win32/wua_sdk/portal-client
https://stackoverflow.com/questions/14989145/checking-windows-updates-directly-through-wsus

There is a registry key, but this should only tell if an applied Windows Update wants a reboot.
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired

Hope this helps you.

Re: Prevent installation if pending reboot or updates are in progress

Posted: Fri Jun 12, 2020 3:35 am
by digibum
Thank you @FrancescoT, this is the key I'm using at the moment. Will se if this will be sufficient for producing. Otherwise I will prepare a script that will check all associated registry key.

Actualy using /SkipRules=RebootRequiredCheck switch on MSSQL setup should bypass this resctricount, but this is not allways the case. Will report back.

Thanks for now.