Old 18th April 2018, 10:04   #1
spcmicro
Junior Member
 
Join Date: Apr 2018
Posts: 2
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 is offline   Reply With Quote
Old 18th April 2018, 15:18   #2
spcmicro
Junior Member
 
Join Date: Apr 2018
Posts: 2
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.
spcmicro is offline   Reply With Quote
Old 18th April 2018, 16:33   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,888
This is more of a MSI question than a NSIS question, ExecWait is just a thin wrapper around the CreateProcess Windows function...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
msi nsis logging

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump