51

I have been trying to create a log file for an issue with our installer with the following commands:

msiexec /i "installer.msi" /l*v "log.log"
msiexec /i "installer.msi" /l*v
msiexec /l*v /i "installer.msi"
msiexec /l*v "log.log" /i "installer.msi"

and several other variations of the command, but it always pops up the window that states what command line parameters are valid for msiexec. What is the correct way to have the msi file create a log? I have windows installer 4.5.

4
  • I just tried it again after a reboot, the first command worked immediately. Dunno what was wrong but it's logging now.
    – codewario
    Aug 19, 2011 at 19:07
  • It could be that either .log or .msi got locked by a process, and it failed. Or Windows Installer service became unstable for some reason. Aug 20, 2011 at 8:49
  • My experience is that it's best to always specify the full path to the MSI file. Can't tell if that's the problem without knowing the context of the msiexec commands.
    – PhilDW
    Oct 12, 2014 at 19:50
  • 1
    Some MSI logging tips - including how to make logging policy based and always available. Oct 28, 2020 at 17:32

2 Answers 2

83

The first and the last command lines are correct:

msiexec /i "installer.msi" /l*v "log.log"
msiexec /l*v "log.log" /i "installer.msi"

And you can drop quotes in this particular case.

13

If you are using Visual Studio 2008, use capital "/L" for the log option. Lower-case "/l" is ignored.

msiexec /i "installer.msi" /L*v "log.log"

This appears to have been fixed in later versions of msiexec.

3
  • Options are case-insensitive; Sure, capital L is more distinctive than lower-case l. Nov 25, 2013 at 7:00
  • 1
    MSDN documentation says “Command-line options are case-insensitive.” (The second sentence on the page.) I have always used the lowercase /i and /l options. Nov 25, 2013 at 17:21
  • It probably depends on which version. I wrote the answer because it required capital L in Visual Studio 2008. It seems that MS has fixed the issue, because I just tried again in Visual Studio 2013 and it accepts lower case L. Nov 25, 2013 at 18:04

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.