How to catch which dlls are causing the server to restart unexpectedly

216 views Asked by At

I have a Windows Server 2012 R2. When I install a msi, Windows installer gives me a prompt telling that system will restart in 60 seconds. How can I catch which dlls are forcing the machine for reboot? Or how can we provide handle at the folder level to know which dlls are the culprit for force reboot?

I tried this Get-EventLog -Logname System -Newest 1 -Source “USER32” | Format-List This outputs only about the process, time, username, etc. I want to know the specific dll name behind the issue. How can I do that?

Thanks in advance for your help!

1

There are 1 answers

0
Stein Åsmul On

Improved?: Different ways to create and interpret MSI logs.


Command Line: In most cases reboots can be prevented by using the appropriate installation command line for msiexec.exe - the magic sequence is the REBOOT=ReallySuppress as illustrated here:

msiexec.exe /I "F:\MySetup.msi" /QN /L*V "F:\msilog.log" REBOOT=ReallySuppress

Quick parameter explanation:

/I - run installation sequence.
/QN - run completely silently.
/L*V "F:\msilog.log" - create verbose log file.
REBOOT=ReallySuppress - suppress any reboots triggered by the Windows Installer engine.

Disclaimer: Be aware that it is still possible for an MSI to trigger a spontaneous reboot from calls made from within elevated, deferred mode custom actions. However, in most cases the above command line prevents unexpected reboots.


Logging: In order to determine what happens during an MSI installation, you check the system's event log and you enable Windows Installer's own logging mechanism - which will produce very verbose, but helpful log files once you learn how to interpret them. You can see how to enable logging in the command line above. It is the /L*V "F:\msilog.log" section. The logging options first, and then the full log file output path. /L*V logs everything (barring some debugging stuff).

  • Log All MSIs: There are more details available from installsite.org's Logging FAQ. I recommend you enable logging for all MSI setups. Then you always have an MSI log available when you suddenly need one. See the above link under "Globally for all setups on a machine" for how to do this.
  • Interpreting the Log: Some logging and log-file interpretation hints can be found here. There is an annotated PDF file you can download, and there is the tip on searching for "value 3" to find errors in the log.

Some Links: