1

I'm using below command to launch my installer from command prompt:

msiexec /i "myproduct.msi" /l*v install.log

Since I'm using /l*v option so installer automatically shows me a check box on the finish screen having its label as "Show the Windows Installer log".

enter image description here

Now I check the check box and then click on the finish button but it doesn't open the install.log file which got created during the installation process. I can see the install.log file present in the root of the directory from where I had initiated the installation. Why the log file is not opening?

RBT
  • 24,161
  • 21
  • 159
  • 240
  • What _does_ it do, according to the log? – Michael Urman May 09 '17 at 12:10
  • I didn't get your question. Are you saying that I should observe some log statement in the logs when I click the `Finish` button. Do you? – RBT May 09 '17 at 12:13
  • If you look in the log file that was created (but not shown), there should be a custom action that attempts to show the log. Presumably it is failing. Perhaps the log will show what it attempted to do, or what failed. – Michael Urman May 09 '17 at 12:16
  • No. I don't see any errors in the log files. Custom action? Will I have to write a custom action to open that log file? That checkbox becomes visible on its own the moment I use `l*v` argument with msiexec. I'm hoping installshieild will do the task of opening that log file on its own through some out of the box feature. – RBT May 09 '17 at 12:34
  • It normally does (yes, it uses a custom action), and nothing shared so far explains what is wrong. – Michael Urman May 09 '17 at 15:04

1 Answers1

0

I was finally able to nail it down. Actually from starting I was under an impression that showing up of the installer log file will happen on its own. I got that impression because the moment you add /l*v install.log argument into msiexec command you start seeing that "Show the Windows Installer log" checkbox on its own without doing any explicit coding.

The checkbox's visible property is governed by a pre-existing public property named ISSHOWMSILOG and it is already baked into the basic MSI installer project template. Now, if we want the log file to be really shown when the check box is checked then an explicit custom action has to be called to show up that file on the click of Finish button:

Event Type : DoAction

Event invocation condition: MsiLogFileLocation And (ISSHOWMSILOG="1") And NOT ISENABLEDWUSFINISHDIALOG

Event Action : ShowMsiLog

After I made this change into my basic MSI project then only the log file started to show up on click of Finish button.

RBT
  • 24,161
  • 21
  • 159
  • 240
  • I'm fairly sure the action should already be there. Unless perhaps the project was originally created in an old version of InstallShield and migrated. (This should be easy to confirm with a throwaway test project.) – Michael Urman May 10 '17 at 12:42
  • Ohh. you were right. I checked it that in a new IS 2016 project from scratch the same code is there. Now I remember I had upgraded this project from IS 2014 to IS 2016. But the thing is that the same line of code is present in a new blank project of IS 2014 also. Then how come did that code got lost during migration? – RBT May 10 '17 at 12:54
  • My guess is it's from an even older version. Migration ignores most dialog boxes as you could have customized them and we don't want to break it. – Michael Urman May 10 '17 at 15:03
  • I did a quick test to validate the same. I created a basic MSI project in IS 2014 and then converted it to IS 2016. In this case, whatever custom action code (to show log file) was written on the click of `Finish` button it persisted as is. – RBT May 11 '17 at 01:27