Video Screencast Help

How to trigger a restart of IE/Firefox/Chrome when install finishes

Created: 23 Aug 2010 | 2 comments
Dor's picture

I've created an installer that deploys an addon for a web browser.  In this case, we'll limit it to just IE, Firefox and Chrome.
Installation works just fine and the app works as expected if the browser is reopened after the install finishes.

What I would like to do is popup a dialog that says "would you like to restart your browser now", similar to the way apps like Google Voice and Video Chat installer does.

Problem is that I can't find a clean way of shutdown/restarting any open browsers.
I can fire off a kill command at any running processes, but I'm shooting for the cleaner approach of an actual restart.

Has anyone out there tackled this one from within Wise and have any suggestions for me?

Comments 2 CommentsJump to latest comment

nac's picture

Hi, you can write a custom action( in VBS or wise script) which will get executed at the end of installation, displaying appropriate message box asking to shutdown browser processes.

you can keep on prompting message box unless and untill browsers are closed(do-while)

demo code ->

exerunning=true
do while exerunning
   exerunning=false
   set colprocesslist = objwmiservice.execquery ("select * from win32_process where name='iexplore.exe'")
   for each objprocess in colprocesslist
        If ucase(objprocess.name)=Ucase("iexplore.exe") then
             exerunning=true
             msgbox("shutdown web browser")
        End if
   Next
   IF exerunning=false
         EXit do
   end if
loop

EdT's picture

Your options are either to force a restart of the browser(s) detected or to nag the user until they shut down the browsers and restart them. The latter method avoids losing any sites that the user may not have finished with.
Perhaps a better approach would be to check for running browser processes BEFORE you start your install, and ask the USER to shut down browser sessions or allow your code to force close the browsers before the install commences. Then of course, there is no need to restart anything as the user can do it as soon as you announce that the install is complete.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.