cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rherrick
Level 4

Always launch from MSI?

I just recently moved to InstallShield 2010 LE from the Visual Studio setup functionality. We have an inline update process where our app downloads the installer MSI and launches msiexec.exe with the /passive option set. So the normal installation has the "Launch app now" checkbox or whatever it is and that works fine. The problem is that with a passive installation process, the user never gets the UI and so never gets the opportunity to check that box (it's actually checked by default) and so the app doesn't launch when installation is finished.

Is there a way to specify that the app should always be launched when installation is completed unless told otherwise (e.g. the user unchecks the launch checkbox in a non-passive installation)?
0 Kudos
(6) Replies
Lenwin
Level 10

Hi,

An application is launched at the end of installation through the Setup Complete Success dialog in InstallShield.

When the passive option is used the Setup Complete Success dialog is skipped. Hence the application is not being launched.

When passive option is used no prompts or error messages are displayed to the user.

Thanks,
Lenwin
0 Kudos
rherrick
Level 4

I understand that since that is actually what's happening. My question was whether there's a way to make the installer do the launch. I'm guessing from your response that the answer is no, correct?

Is there a way to detect that the installer is running in passive mode and trigger a post-install action based on that? In that case, I would set up a post-install action to launch the app only when the installer is running in passive mode and allow the user to do the launch through Setup Complete Success option.
0 Kudos
Lenwin
Level 10

Hi,

It is not possible to launch only the Setup complete success dialog in Passive mode as the dialogs are displayed in a sequence.

When the Installer is run in Passive mode the UILevel property is set to the value 3.

You may try accessing this MSI property through a VB script and use it as a condition.

Thanks,
Lenwin
0 Kudos
rherrick
Level 4

Thanks for the response, Lenwin.

I'm actually not interested in displaying the dialog itself, but in getting the installer to launch the app upon completion. In non-passive mode, of course, the user can select the launch checkbox and the app is launched. What I'd like is to have the app launched unconditionally when running in passive mode, while leaving the option for the user to launch or not in non-passive mode.

With our previous Visual Studio installer, I just ran a VB script upon installer completion. The script launched the app directly, so there was no conditionalization. I could go back to doing that, but is there a way to detect whether the installer is running in passive mode or not? Here's what I'd like to do:


  • If the installer is in passive mode, launch the app. This could be via the installer's launch function that's normally triggered by the user checking the Launch checkbox or via my own VB script.
  • If the installer is not in passive mode, let the user select the Launch checkbox. Launch the app from the installer regularly and DON'T invoke the VB script.


Of course, this all depends on whether I can detect if the installer is running in passive mode. If not, I'll just turn off the Launch checkbox and will always launch unconditionally through my VB script. I'd prefer to keep the launch checkbox for non-passive installs, though.
0 Kudos
rherrick
Level 4

OK, I figured it out! I'm still thinking in terms of the old installer stuff in Visual Studio. You couldn't set up running the exe directly from the installer there for some reason, so I had to run a VB script to launch the app. I was trying to do the same thing here. But as it turns out, you can do a custom action to launch the newly installed exe directly. I put that in and voila, my app is launching after installation.

I'd still like to conditionalize that launch based on whether the MSI was launched in passive mode, but I also understand that this is the LE version, so I'll get by with what I've got!

Thanks for the help.
0 Kudos
rherrick
Level 4

Oops, spoke too soon. The EXE launch works fine from the regular installer. I just ran it through msiexec with passive mode and the custom action isn't invoked. The custom actions are apparently tightly keyed to the actual dialog displays and since dialogs aren't displayed in passive mode, no custom action is called.

Is there any way to have a custom action invoked at the end of a passive installation? If not, that's a HUGE weakness and it doesn't appear that it's limited to the LE version of the product.
0 Kudos