cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
svengalamr
Level 4

How to detect whether a system requires a reboot or not??

Hi,

I have question like whether the system can determine that it requires a reboot or not.
More details: I'm installing Roles and Features(IIS,MSMQ) from my application. after installing I would like to know whether the system needs a reboot or not.

Here I dont want to take the decision, I would like the System to take the decision whether to reboot the machine or not.

My question is Can we find out from Registry or some where else does the system requires a reboot or not?

Any help is appreciated

Thanks in Advance

Seshu
Labels (1)
0 Kudos
(4) Replies
Johannes_T
Level 6

I needed the same function some moth ago. In my case (I don't know if this is a sufficient condition in general) I checked this via the registry value:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations.

When an installation is unable to replace/delete some file, it often uses this value to let windows change this at the next startup. The software I had to install always wanted a reboot when this value was set.

Hth, Jo
0 Kudos
svengalamr
Level 4

Hi,

Thanks for your quick response.

And Here I'm working with Win 2008 server. and i dont find that this Kay is existing in the registry.

Please let me know if we have any other alternate key for this.

Thanks & Regards

Seshu
0 Kudos
Johannes_T
Level 6

Hi,
sorry for this late response!
I'm not aware of any other way to check this. But note, that the registry value I mentioned exists only if a reboot is needed.
Greetings
Johannes
0 Kudos
kaneohe
Level 6

I believe Windows deletes this key after all the file rename operations have completed during the reboot cycle.
0 Kudos