Skip to content
⌘ NSIS Forum Archive

Enable MSI logging when executing an MSI file.

3 posts

spcmicro#

Enable MSI logging when executing an MSI file.

I am launching an MSI installer from NSIS with the following command:

ExecWait 'msiexec /i "$INSTDIR\MSI_Installer.msi" '

This works fine but I would like to turn on MSI logging when executing the installer. I have tried to put the /l option in various places in the command line with and without quotes and can't seem to get it to work. The installer fails to launch and either displays a dialog showing MSI parameters or it says that the installation package cannot be opened.

Is it possible to enable logging via NSIS when executing the ExecWait command? If so, what is the correct syntax?
spcmicro#
Found the solution

Found the solution to enable MSI logging via NSIS. Here is the correct syntax:

ExecWait 'msiexec /i "$INSTDIR\MSI_Installer.msi" /l*v MSI_Installer.log'

You must specify the log file name and the logging options go after the MSI filename.
Anders#
This is more of a MSI question than a NSIS question, ExecWait is just a thin wrapper around the CreateProcess Windows function...