Professional Documents
Culture Documents
Reading LOGs For MSI Troubleshooting
Reading LOGs For MSI Troubleshooting
Application Packaging
What is LOG file!
A log file is a record of events taking place in the execution of a system and could be useful
to perform log analysis in system troubleshooting
Logs are essential to understand the activities of complex systems in the case of
applications with little user interaction.
VERBOSE LOGGING
Verbose means using more words than necessary.
Verbose logging is a computer logging mode that records more information than the usual
logging mode.
NOTE:
In case of an Active Directory/GPO deployment, there will be no logged on user at the time
the installation occurs. In this case the log file will be created in the "Windows\Temp" folder.
To enable Windows Installer logging we should add the following registry in system
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"
The letters in the value field can be in any order. Each letter turns on a different logging
mode and described as follows
v - Verbose output
o - Out-of-disk-space messages
i - Status messages
c - Initial UI parameters
e - All error messages
w - Non-fatal warnings
a - Startup of actions
r - Action-specific records
m - Out-of-memory or fatal exit information
u - User requests
p - Terminal properties
+ - Append to existing file
x - Extra debugging information.
"*" - Wildcard, log all information except for the v and the x option. To include the v and the
x option, specify "/l*vx".
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup
LogLevel (DWORD) = 4800FFFF (hexadecimal).
In case of command line installation on windows installer we can get the log using following
command,
Most errors that occurred during the install including all Windows Installer errors that
generate a user dialog.
All standard actions executed as well as any custom actions that were executed
Whether a reboot was requested and completed.
Values of Installer Properties, including details of any changes.
The source location of the installation media
Whether the user cancelled the install.
If the installation was completed or stopped.
If the installation was rolled back, this will also be notated in the log
Client and Server information
After each action the Installer will record the 'return value' in the log.
This is an indicator of the success or otherwise of the action. Possible values are:
Value Meaning
0 Action was invoked, but did not run (not necessarily a bad thing,
maybe there was nothing for it to do)
1 Action was a success
2 Action was cancelled by user
3 An unrecoverable error has occurred
4 The installation was suspended awaiting a reboot
Simply searching for the phrase "Return Value 3" can be a quick way of pinpointing the
errors in a log.
This isn't guaranteed to lead to the source of a problem as some problems are quite subtle,
but its good first step.
It may also break down in localized setup scenarios.
1. It is a good idea to read the file from the bottom up, as the error will have occurred
nearer the end of the file.
2. You will notice that an MSI log is split into two categories; 'Properties', which are
displayed at the end of the article and 'Actions'.
An Action looks like:
MSI (s) (0C:50) [04:01:06:723]: PROPERTY CHANGE: Adding PackagecodeChanging
property. Its value is '1'.
A Property looks like:
Property(S): IdentityCacheDir = C:\WINDOWS\Microsoft.NET\Framework64\
Focus on the Actions as opposed to Properties. Each action makes up a part of the
installation procedure.
3. To determine which action has failed during the installation, search for the error
generated during installation.
Ex: if error 1603 was displayed during the Application installation, search for 1603 in
Application Install Log.txt
4.When you have located the error, look at the Action that was performed just before the
error. A return value code is written in the log to show if the action completed successfully
or not. One of the following will be displayed:
Return Value 1 – The Action completed successfully
Return Value 2 – The user terminated the action
Return Value 3 – The Action failed (will cause the installation to terminate)
Make a note of which of the actions gives a return value of 3, and record any additional
error information in the log file that may not have been displayed in the on-screen error.
The Installer logs a lot of useful information in the form of 'error' codes.
Sometimes these are genuine errors, but often they are simply for information purposes and
do not indicate a real problem.
Full details of all codes can be found in the MSDN Library or the Windows Installer SDK Link.
Ex: take the following entry from the annotated log below:
MSI (c) (C0:6C) [22:17:24:953]: Note: 1: 1402 2:
HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info 3: 2
The SDK defines the code 1402 as: Could not open key: [2]. System error [3].
MSI (s) (34:A1): Feature: _MainFeature; Installed: Absent; Request: Local; Action:
Local
For a feature state entry in the log file, the entry will be prefaced with Feature: and the
feature name will follow.
In this case, the feature state being displayed is for the feature named _MainFeature.
The Installed entry represents the current state of the feature on the machine.
When the setup package is being in installed for the first time, this value following Installed:
will typically be absent meaning the feature is not currently installed on the machine.
In this example, we can see that the RegisterTypeLibraries standard action is rolling back
the previous work done earlier in the installation when the RegisterTypeLibraries action
executed.
Component state
For a component state entry in the log file, the entry will be prefaced with Component: and
the component name will follow.
MSI (s) (34:A1): Component: Global_Notepad; Installed: Local; Request: Null; Action:
Null
In this case, the component state being displayed is for the component named
Global_Notepad.
The Installed entry represents the current state of the feature on the machine.
When the setup package is being in installed for the first time, this value following Installed
will typically be Absent meaning the component is not currently installed on the machine.
Ex: Installed is set to Local meaning that the underlying component is already installed on
the machine.
There are other values are possible for Installed such as Local, Null, Request, etc.
Property
At the end of the verbose log file is a complete property dump of the property names and
values which can have either client or server properties listed, client only or server only
depending on what operating system the log was generated on and what the user interface
level was set to.
Ex: in a quiet mode installation on Windows NT, 2000 or XP, only the server process is
executed and only server process properties would be displayed at the end of the log file.
The following is an example line found in a verbose log file of a property and its value at the
end of the client part of the installation before switching to the server process.
This line shows the value of the USERNAME property on the client side of the installation
before switching over to the server process was set to someuser.
You can tell this is a client property by noticing the C in the Property (C) notation.
The following is an example line found in a verbose log file of a property and its value at the
end of the server part of the installation just before the installation terminated.
The server process performs the actual installation functions such as copying files, writing to
the registry, etc. Most actions appear in two forms in a verbose log file.
The first form is to add it to the installation script that will be ran later on in the installation.
Bootstrapper Logs
Install Shield has a method for creating a log file for the Setup.exe and Update.exe
bootstrappers. You can simply use the /debuglog parameter from the command line when
you run Setup.exe. This command line parameter can be used with the Setup launcher for
Basic MSI, Install Script MSI, and Web projects.
Here it is:
Setup.exe /debuglog
You will notice that a file called InstallShield.log has been created in the same folder as
Setup.exe.
What you must remember here is that, this is only the log file for the Setup.exe
bootstrapper. At least that is what it seems. When you look at this log file, you see that it
doesn’t contain the detailed information available when compared to the log file created as a
result of placing the value in the registry, which was outlined in the previous movie.
There is one more thing to know about the /debuglog command line parameter. You can
also specify the full path to the log file, so it could be created in an entirely different location
from Setup.exe. This is useful if Setup.exe is on a CD-ROM, or any other unwrittable
location. Here is an example of that:
Setup.exe /debuglog”C:\SetupLogFile.txt”
EVENT LOGING
The event-logging service stores events from various sources in a single collection called an
event log.
The installer also writes entries into the event log. These record events such as following:
Success or failure of the installation.
Errors during product configuration.
Detection of corrupted configuration data.
Ex: Error number in the Error table for an installation completed successfully is 1707
The successful installation is logged in the Application Event Log with a message ID of
11707 (1707 + 10,000).
10005-The installer has encountered an unexpected error installing this package.
11707 - Installation operation completed successfully.
11708 - Installation operation failed