Trouble shooting Windows installers

Windows installers come with MSI (Microsoft Installer) files. It is up to the creator of this installer if you get more information if something went wrong when installing or uninstalling an application. Although via the command line MSI supports the ability to generate log files. In this way it can help you troubleshoot installation failures.

Creating a log file when installing an application

To create a log file during installation of an application use the following command:

msiexec /i "<your_installer.msi>" /l*v "<name_of_log_file.log>"

Replace your_installer.msi with the name of your installer and name_of_log_file.log with the name of the logfile you want to create.

Creating a log file when uninstalling an application

To create a log file during an uninstall of an application use the following command:

msiexec /x {<ProductCode>} /l*v "<name_of_log_file.log>"

The ProductCode is a hash that points to an installation. To get this hash, you can use the following command within a command prompt:

wmic product where "Name like '%<ApplicationName>%'" get IdentifyingNumber /value

Note when executing this command, it can take some time to retrieve the ProductCode. When the command finished, you see something like this:

IdentifyingNumber={AEJ317H9-21QT-4E2C-J51E-BC21235521AD}

Using this in our previous command:

msiexec /x {AEJ317H9-21QT-4E2C-J51E-BC21235521AD} /l*v "<name_of_log_file.log>"

Note that wmic only lists MSI-installed applications. Applications installed via EXE-installers, MSIX, or the Microsoft Store may not appear.

As an alternative, you can use within Powershell:

Get-WmiObject Win32_Product | Select Name, IdentifyingNumber

Posted in Uncategorized by Bruno at December 23rd, 2025.

Leave a Reply