Check for system reboot required?

Got a problem you cannot solve? Try here.
pushpraj
Posts: 2
Joined: Tue May 23, 2017 7:28 am

Check for system reboot required?

Postby pushpraj » 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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Check for system reboot required?

Postby FrancescoT » Mon Feb 19, 2024 9:46 am

Dear Pushpraj,

it's not available a built-in method for that.
At any rate you can easily accomplish this by reading such system registry from your setup script using the "Read Registry" command (https://www.installaware.com/mh52/desktop/readregistry.htm).
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 23 guests