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

Comments

Please log in to comment

Answers

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
0

The MSI will return an exit code that requests a reboot.  Check for 3010.

Answered 08/24/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
0

check the EventViewer, if the installation requires REBOOT. The respective entry will be added to EventViewer.

Answered 08/24/2009 by: mekaywe
Brown Belt

Please log in to comment
0

You may find this utility useful to find out why you need to reboot:
http://exodusdev.com/products/whyreboot

Answered 08/25/2009 by: revizor
Third Degree Blue Belt

Please log in to comment
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]

Answered 08/25/2009 by: MSIPackager
Third Degree Black Belt

Please log in to comment
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.

Answered 08/25/2009 by: VBScab
Red Belt

Please log in to comment
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)

Answered 08/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
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

Answered 08/26/2009 by: darkfang
Blue Belt

Please log in to comment
0

If you install the MSIs through your exe then just take care of the return code which TK posted.

Answered 08/31/2009 by: AngelD
Red Belt

Please log in to comment
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.

Answered 08/31/2009 by: michaelnowell
Second Degree Blue Belt

Please log in to comment
0

I think we scared him off.  Are we TOO helpful?

Answered 08/31/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
0

Good catch Michael however; wouldn't that be too late for the "tool" to take care of it?

Answered 08/31/2009 by: AngelD
Red Belt

Please log in to comment
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.

Answered 08/31/2009 by: michaelnowell
Second Degree Blue Belt

Please log in to comment
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.

Answered 08/31/2009 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity