Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know that if you go through the pending updates, there's a flag (rebootrequired, or similar) that will tell you if a reboot is mandatory, not required, or may be required. It seems that in the metadata of a lot of updates, this is tagged as "maybe, not sure", so there's not a sure fire way to know if an update will cause a reboot.

Given the Microsoft.Update.Session API, is there a way to check through the update content to see if the code itself will change the registry setting HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired to make windows knows it needs to reboot?

I'm assuming that, even though the metadata is "maybe", there's something in each update that forces this registry flag to to "Ping! I need to reboot!"

Either that, or is there a more reliable way to work out how check which updates require rebooting?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The reason it says "maybe" is because it truly depends and is unique from situation to situation.

Windows Installer may prompt for a reboot if it installs over a file that is in use or the package explicitly requests that the installer reboot. It is easy to determine if Windows Installer prompts for a reboot because it installed over a file that is in use. The first step is to generate a verbose log file. In the verbose log file, look for the presence of the ReplacedInUseFiles property in the property dump. If this property is present with a value of 1, then the Installer will require a reboot because it overwrote an in-use file.

share|improve this answer
    
I'm guessing the verbose log isn't the C:\Windows\WindowsUpdate.log file, as it doesn't include any references to ReplacedInUseFiles. And I'm also guessing that the log won't be created until the update actually installs, which I don't need to check for, as the registry setting RebootRequired will tell me anyway. I'd be nice if I could work this out before updates, but sucks that I can't. –  glasnt Dec 23 '11 at 0:31
    
I'm sure it's theoretically possible, but you will need to know right before you start what all is in use... Process Explorer and RAMMap might help... but yeah, you've got your work cut out for you. :\ –  Ryan Ries Dec 23 '11 at 0:33
    
That's ok, was wondering why the metadata was always saying "Meh, might have to reboot, don't care". I can make the assumption that you may need to reboot on any update, and deal with it when it happens. –  glasnt Dec 23 '11 at 0:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.