Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Auto-launching a just-installed application


5 replies to this topic

mstone

mstone
  • Members
  • 20 posts

Posted 17 March 2004 - 16:00

I need to automatically launch the application after its installation has been successfully finished. Currently I run it as a "no-wait-for-completion" deferred custom action (type 1024+128+64+18), but it starts before the user has pushed the "Finish" button on the last wizard page. What's the best way to do it so that it works works correctly in all UI modes?

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 18 March 2004 - 04:44

Add a custom action onto the finish button.

hteichert

hteichert
  • Members
  • 158 posts

Posted 18 March 2004 - 09:37

Sorry luke_s, but your solution only works for Full UI. mstone asked for a solution to work on all UI-levels.
I never tried to start the installed application in a completely or mostly silent UI mode - the user isn't there anyway, but I would use a combination of both current solutions. For an UILevel <5 use the deferred CA (use a condition "UILevel<5" for this deferred CA) and for an UILevel=5 use another CA (type 210; 192 + 18) on the Finish button.
It should work then for /qn, /qb, /qr and /qf, but there's still the problem that the app will start before the finishing dialog for /qn+ and /qb+ (the "+" is: show a modal dialog box at end of installation). Simply using the property UILevel doesn't help to detect this special behaviour. I have no good idea about that, but perhaps the installer function MsiSetInternalUI could help ...
h.teichert-ott

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 18 March 2004 - 22:30

Well personally, i would not execute the program if the user has selects silent mode because they most likely would not want the program to run after their silent install.

What do you mean by - UI-levels?

hteichert

hteichert
  • Members
  • 158 posts

Posted 19 March 2004 - 09:41

Yes, luke_s, I agree with you in not running an application if it's a silent installation. I also use the solution with an action on the Finish button. But if somebody wants to, it's his decision.

UI-Levels:
Windows installer supports different so called UI-levels.
- full
- reduced
- basic
- silent
Only in full UI-level you run through the complete dialog sequence. In reduced mode you only see the modeless dialogs you created and in basic mode you see the windows-installer built-in modeless dialogs to show the progress of the installation. Silent mode -- as the name says.
Further info in Microsoft's Windows Installer documentation, chapter User Interface or search for "User Interface Levels".

h.teichert-ott

mstone

mstone
  • Members
  • 20 posts

Posted 19 March 2004 - 14:14

Thanks, hteichert, for a really comprehensive answer. I came to this idea of conditionally launching the custom action from both InstallExecute sequence and Finish button, but I missed the potential problem with /qb+ and /qn+.

Although it might seem counter-intuitive to launch an application in silent mode, it does make all the sense in my case: I'm dealing with a client application that can be launched in its own "silent mode", connect to the server (whose address it gets from the command line) and perform all the necessary registration without any user interaction.

Anyway, I think that my final decision will be to stop fighting for the perfection in Full UI mode and put up with the application starting before the "Finish" button is pressed.