Check for system reboot required?
Posted: Wed May 31, 2023 2:07 am
Required a function that will return a flag if the system is pending for restart. (After window update or any patch download)
Below registries are holding values of the system pending restart.
- "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"
- "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations "
- "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired "
We are facing issues in silent installation, when we uninstall the old setup, the user received the Reboot required flag after uninstallation. As it is a silent installation user will not receive the pop-up for restarting the system and resuming the setup. Now the user application is removed from the system and a new one is not installed.
Now we wish to make sure before uninstalling the old version of the application we will have a check for the system that is pending restart. or have rollback-like things that we can make sure the User will have at least the Old version if a new version is not installed.
Thanks in advance.
Regards,
Pushpraj
Below registries are holding values of the system pending restart.
- "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"
- "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations "
- "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired "
We are facing issues in silent installation, when we uninstall the old setup, the user received the Reboot required flag after uninstallation. As it is a silent installation user will not receive the pop-up for restarting the system and resuming the setup. Now the user application is removed from the system and a new one is not installed.
Now we wish to make sure before uninstalling the old version of the application we will have a check for the system that is pending restart. or have rollback-like things that we can make sure the User will have at least the Old version if a new version is not installed.
Thanks in advance.
Regards,
Pushpraj