Go Back

How Do I Get Logging From A Standard MSI?

Often times we get an MSI that for whatever reason will not install or uninstall; its helpful to grab the logs to try and understand what has occurred. How do I do this?

2 Answers
0   | Posted by Ace Olszowka to Installation on 9/13/2016 1:57 PM
Ace Olszowka
Again if you're using a standard Windows Installer MSI Package (such as one produced by WiX) you can utilize the incredibly useful and versatile MSIExec (https://technet.microsoft.com/en-us/library/bb490936.aspx).

Specifically you'll want to utilize the following switch:
/log Installer.log
This switch can be used on both Installs and Uninstalls.

However as of the time of this writing (09/13/2013) Synergex is still shipping Installers which utilize the InstallShield wrapper which hides the useful and versatile MSI in a useless and cumbersome InstallShield wrapper. This wrapper must be stripped prior to producing any useful work.

There are several ways to strip this wrapper; most are concerned with the install process as once it is installed the uninstall uses the Standard Windows Installer Package.

The absolute quickest way to get to the useful MSI's are to start an installation and then abort it; this will cause InstallShield to extract the useful MSI's to the temporary directory (as an aside because it does not clean up after itself this is the source of the "Would you like to override these files?" dialog you encounter on boxes which have had an installer previously ran on them; ALWAYS HIT YES TO ALL!). As of the time of this writing it appears that the installers are dumped to the following location:
  • SDI - %TEMP%\Synergex\SDI\
  • SDE (32bit) - %TEMP%\Synergex\SDE
  • SDE (64bit) - %TEMP%\Synergex\SDE64
  • xfServerLink - %TEMP%\Synergex\NN
At these locations the underlying useful MSI can be found, at which point you can invoke MSIExec as desired.

In the case of an error you'll have to skim though the log looking for useful information (unfortunately its usually buried somewhere in the log) for example the last portion of a log might look like this:
 
MSI (s) (68:8C) [07:42:57:524]: Product: Synergy DBL Integration for Visual Studio 10.3.3a -- Removal failed.

MSI (s) (68:8C) [07:42:57:524]: Windows Installer removed the product. Product Name: Synergy DBL Integration for Visual Studio 10.3.3a. Product Version: 10.03.0301. Product Language: 1033. Manufacturer: Synergex International Corporation. Removal success or error status: 1603.

=== Logging stopped: 9/13/2016  7:42:57 ===
YOU MUST BE CAREFUL TO IGNORE THE LIES Such as "Windows Installer removed the product." Read all the way to the end of the message to see that you actually ERROR'ED!

Using this error message you can start to skim the log looking for what might have failed; in this case:
 
runsilent: executing:"C:\Program Files (x86)\Microsoft Help Viewer\v2.0\hlpctntmgr.exe" /operation uninstall /catalogname VisualStudio11 /locale en-us /silent /vendor "Synergex" /booklist "Synergy DBL" /productname "Synergy/DE"
runsilent: Runing from::
Info 200.runsilent: exit code returned:200
CustomAction caDev11HelpUninstall returned actual error code 1603 but will be translated to success due to continue marking
1: command string 2: 0 3: "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe " /setup /Log 
1: caRefreshVSCmdLine 2: Return Code From Process 3: 0 
1: caRefreshVSCmdLine 2: Finishing off ticks 3: 40000000 
1: command string 2: 0 3: "C:\INSTALLDIR_DEV14\devenv.exe " /allowDuringSetup /clearCache 
1: CreateProcess Failed 2: 2 3: The system cannot find the file specified.
 
CustomAction caClearCacheDev14 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 7:42:57: InstallFinalize. Return value 3.
InstallShield 7:42:57: Rolling back XML file: 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config'
InstallShield 7:42:57: Temp XML file copy is located at: ''
We can see that a CustomAction was not marked as ContinueOnFailure and therefore the error of 1603 is being bubbled up; compare this to the earlier failure (the failure to remove a Help Log) which returned an error 200; but because ContinueOnFailure was marked as true this was silently ignored.

It's a bit of a game of cat and mouse; but more often than not you'll hopefully get the information you need to move forward quickly. Sometimes however you're unable to move forward without the assistance of the original install writer (or some creativeness with Orca or Dark/WiX) however those posts are for another day.

 

9/13/2016 2:12 PM   0  
Best Answer chosen by Ace Olszowka
Jerry Fawcett
With Synergy installations this log file is automatically created (with Windows versions higher than Server 2003 and XP).  This file is created automatically by Windows Installer Service and is named MSIxxxx.log (where xxxx is a randomly generated alphanumeric string) and placed in the user?s %TEMP% directory. There will likely be many MSI*.log files in the %TEMP% directory and we recommend sorting by date modified in Windows Explorer to find the correct one.  This information is documented in the Windows Installation Instruction?s Troubleshooting section.

With Windows XP and Server 2003 (no longer supported with 10.3 and higher), you can create an installation log file by running the installer with logging enabled. To do this, open a command prompt and navigate to the directory where the files were extracted from the downloaded installer, and run the following:

setup.exe /v"/l*v logfile_name"

For example,
setup.exe /v"/l*v c:\temp\install.log"
 

9/13/2016 3:23 PM   1  
Please log in to comment or answer this question.