Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out if an MSI I just installed requested a Windows reboot?

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?

like image 792
Nestor Avatar asked Nov 06 '09 06:11

Nestor


1 Answers

The following registry location has the information:

Key HKLM\System\CurrentControlSet\Control\Session Manager, value PendingFileRenameOperations

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

like image 141
Vinko Vrsalovic Avatar answered Oct 21 '22 22:10

Vinko Vrsalovic