| InstallerContactSite Map |
Advanced Installer User Guide | |||
How do I create an installation log? |
| AnswerWindows Installer loggingWindows Installer handles its installations through Msiexec.exe. The logging options offered by this tool allow you to create different types of logs, depending on the information you need about the installation. These options are:
Create a logThe most used logging command is /L*V. This command will create a verbose log which offers a lot of information about the installation. Here are the steps for creating a log:
Install Log For creating an installation log you can use a command line which looks like this: msiexec /i "C:\MyPackage\Example.msi" /L*V "C:\log\example.log" The /i parameter will launch the MSI package. After the installation is finished, the log is complete.
Note that any logging command line should have this form: msiexec /i <path_to_msi> /L*V <path_to_log> After you use the logging command you need to specify the complete path of the log. If you want the log to be created next to the MSI, you can specify only the name of the log file: msiexec /i "C:\MyPackage\Example.msi" /L*V "example.log" When the package is included in an EXE bootstrapper, the command line no longer uses "msiexec". For example, the command line can look like this: "C:\MyPackage\Setup.exe" /L*V "example.log" Uninstall Log In order to create a log for an uninstall process you can replace the /i parameter with /x. Therefore, a command line which creates a log for an uninstall can look like this: msiexec /x "C:\MyPackage\Example.msi" /L*V "C:\log\example.log" The package path can also be replaced by the package Product Code (it can be obtained by using the Project -> Options menu inside the project). The command line would look like this: msiexec /x {B40D5AC5-6120-4AD6-BBD4-AF5EF7E04351} /L*V "C:\log\example.log"When the package is included in an EXE bootstrapper and it's already installed on the machine, you can launch the installer again with the logging command. For example: "C:\MyPackage\Setup.exe" /L*V "example.log" This will make the package go into maintenance mode and you can choose to uninstall it. Since the package was launched with logging, an uninstall log will be generated. Patch Install Log You can create a log for a patch installation by using the /p parameter instead of /i: msiexec /p "C:\MyPackage\Patch.msp" /L*V "C:\log\patch.log" Use the EXE boostrapper Another approach is to create a log file by using the /L*V parameters in the command line of the Advanced Installer Bootstrapper. Also, these parameters can be always passed to the MSI when the package is launched through the EXE bootstrapper. If you want your installation package to always create a log, you can follow these steps:
This way, when the user launches the installation through the bootstrapper, a log of the installation ("package.log") will be created automatically in the "C:\" drive.
Automated logging with the Windows Installer Logging PolicyThe logging policy is particularly useful for troubleshooting Active Directory/Group Policy deployments, in which case the installation is carried out without a user interface and there is no possibility to specify a command line for the MSI package. In order to enable this option you need to import the registry settings below. Please create a new text file with a ".reg" extension and then copy the following lines into it. After this double click the ".reg" file you have just created and answer "Yes" to the confirmation prompt. REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"
Debug"=dword:00000007The .LOG file will be created in the Temp folder of the currently logged on user, and will have a name of this form: "MSI*.LOG".
In order to disable the debugging policy you can delete the registry values you have added previously using "RegEdit.exe" or you can import the following .reg file as you did with the previous one: REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Debug"=- |
