58

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. Commented 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. Commented 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. Commented Oct 12, 2014 at 19:50
  • 1
    Some MSI logging tips - including how to make logging policy based and always available. Commented Oct 28, 2020 at 17:32

2 Answers 2

91

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.

Sign up to request clarification or add additional context in comments.

Comments

15

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 Comments

Options are case-insensitive; Sure, capital L is more distinctive than lower-case l.
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.
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.