/build/static/layout/Breadcrumb_cap_w.png

How to determine if a reboot is required

hi folks,
i am writing an application that installs msi's using command lines. if any of the msi's installed require a reboot how can i determine this?
is there a registry key that the msi writes so i can find out what msi requires the reboot?
any help here would be great.

0 Comments   [ + ] Show comments

Answers (13)

Posted by: turbokitty 14 years ago
6th Degree Black Belt
0
The MSI will return an exit code that requests a reboot. Check for 3010.
Posted by: mekaywe 14 years ago
Brown Belt
0
check the EventViewer, if the installation requires REBOOT. The respective entry will be added to EventViewer.
Posted by: revizor 14 years ago
Third Degree Blue Belt
0
You may find this utility useful to find out why you need to reboot:
http://exodusdev.com/products/whyreboot
Posted by: MSIPackager 14 years ago
3rd Degree Black Belt
0
Maybe it's just me but I've never found that tool to be any good.. it always just says:

"No items were found.

NOTE that this does not mean that you don't need to reboot your computer, rather, WhyReboot was unable to detect any pending file operations."

Talk about coving the bases [8D]
Posted by: anonymous_9363 14 years ago
Red Belt
0
You'll find it a lot more productive to try and eliminate reboots in the first place. There is a very limited set of circumstances which actually require a reboot. Vendor MSIs typically trigger a reboot as a fail-safe or because their packager was too stupid to work out a way to avoid it.
Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
in your vendor supplied msi look at the sequence tables ie installexecutesequence and UI sequence tables but obviously you will not be deploying with full UI)
Posted by: darkfang 14 years ago
Blue Belt
0
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations"=hex(7):(value in hex)

This key will contains information what file(s) needs to be copied at the next reboot. After the reboot, the key is deleted.


There's also this when you install a Microsoft Patch :

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"SetupExecute"=hex(7):(value in hex)

The value indicated what command to execute at shutdown/reboot. Also, the file C:\Windows\winsxs\pending.xml is created.
After the reboot, the value of "SetupExecute" and pending.xml is deleted.

If you want to nag the user who reboot once a month, google search : GracefuLReboot.vbs
Posted by: AngelD 14 years ago
Red Belt
0
If you install the MSIs through your exe then just take care of the return code which TK posted.
Posted by: michaelnowell 14 years ago
Second Degree Blue Belt
0
You might also want to look for the exit code 1641. This is the code that will be returned if the MSI forces a reboot.
Posted by: turbokitty 14 years ago
6th Degree Black Belt
0
I think we scared him off. Are we TOO helpful?
Posted by: AngelD 14 years ago
Red Belt
0
Good catch Michael however; wouldn't that be too late for the "tool" to take care of it?
Posted by: michaelnowell 14 years ago
Second Degree Blue Belt
0
Nope, I've been running a few scripts (Wisescripts and VBS) that are able to catch the exit code and write them to a log file before the system reboots.
Posted by: AngelD 14 years ago
Red Belt
0
Cool, but I was talking about letting the "tool" handle the reboot instead if it was to allow more installations after the forced reboot install.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ