views:

201

answers:

1

I've built a setup.exe in c# that runs several chained MSI's (with the /QUIET /NORESTART ). At the end I'd like to check if a reboot is needed in the machine (that is, if one of the MSI's requested a reboot).

How can I detect so?

+2  A: 

The following registry key has the information:

HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations

Source: http://technet.microsoft.com/en-us/sysinternals/bb897556.aspx

Vinko Vrsalovic
I have a machine without PendingFileRenameOperations showing the little shield in the "Shut down" button. How come?
Nestor
Doesn't that shield in the shutdown button mean "Install updates and shutdown"? That's not equivalent to a required restart.
Vinko Vrsalovic
ok... do you know then how to detect taht shield? I put that as a separate question and someone complained that it was a duplicate of this one :-)
Nestor