Steps to create Installation log from .msi install file


 Product(s):eB Director
 Version(s):N\A
 Environment:N\A
 Area:Installation
 Subarea:N\A

 

 Original Author:Jyoti Patil

  Windows Installer logging:

The Windows Installer technology uses Msiexec.exe for installing MSI and MSP packages.

This tool gives you full control over the installation process, allowing you to set:

Windows 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 log

Any logging command line should have this form:

msiexec /i /L*V

- The logging command is issued by the /L parameter.

- The 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:

1. Find out the path of the MSI file, for example C:\MyPackage\eB Director (x86).msi

2. Decide the path of the log, for example C:\MyLog\example.log

3. Open cmd.exe (you can use any command shell)

Note: In the command prompt if you are on the path ‘C:\Users\Administrator’ ,then make sure you come to the root directory i.e. C: ,use command “cd\ or cd..” to go to root directory.

4. Use the msiexec command line to launch the MSI with logging parameters. Execute the following command by specifying log's complete path:

msiexec /i "C:\MyPackage\eB Director (x86).msi" /L*V "C:\MyLog\example.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\eB Director (x86).msi" /L*V "example.log"

5. The /i parameter will launch the MSI package. After the installation is finished, the log is complete. Follow the installation wizard, after execution the file example.log appears in MyLog folder.

 

 

6. 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:

Sample command line: msiexec /x "C:\MyPackage\Example.msi" /L*V "C:\MyLog\example.log"

Patch Install Log

You can create a log for a patch installation by using the /p parameter instead of /i:

Sample command line: msiexec /p "C:\MyPackage\Patch.msp" /L*V "C:\MyLog\patch.log"

Install Options

Sample command line:     msiexec.exe /i "C:\Example.msi"

Display Options

Sample command line:           msiexec.exe /i "C:\Example.msi" /qn

Restart Options

Sometimes an installation overwrites files which are in use or needs to reboot the machine in order to finish it. The reboot policy used by the installation can be set through these options:

Sample command line:           msiexec.exe /i "C:\Example.msi" /norestart

Logging Options

When debugging an installation package you can use multiple logging parameters in order to create a log. This log will contain different information for each parameter you use:

Sample command line:           msiexec.exe /i "C:\Example.msi" /L*V "C:\package.log"

Update Options

Sample command lines:        

msiexec.exe /p "C:\MyPatch.msp"

msiexec.exe /p "C:\MyPatch.msp" /qb REINSTALLMODE="ecmus" REINSTALL="ALL"

msiexec.exe /update "C:\MyPatch.msp"

msiexec.exe /uninstall {1BCBF52C-CD1B-454D-AEF7-852F73967318}

  /package {AAD3D77A-7476-469F-ADF4-04424124E91D}

Note : {AAD3D77A-7476-469F-ADF4-04424124E91D} is product code of package

Repair Options

Sample command line:           msiexec.exe /fa {AAD3D77A-7476-469F-ADF4-04424124E91D}