Question on detecting and shutting down running browsers - Advanced Installer Community
mhchoi
Posts: 3
Joined: Wed Jul 31, 2013 8:39 am

Question on detecting and shutting down running browsers

I am currently using Advance Installer Version 10.1.
I am hoping to get some help on how I should tweak the settings.

I would like the installer to work like this:
In the beginning of the installation,
(1) if there is no internet browser (IE, Chrome, Firefox, etc.) running, the installation continues as normal.
(2) if there are any internet browsers open. The installer prompts a message box with "Currently running browsers will exit" text and a OK button. Once the user clicks the OK button, all browser windows are closely automatically and the installation process continues.

In order to test browser closing behavior, I added "Terminate process" action in the "Custom Actions" page and input iexplorer.exe in the "Process Name" field. As I expected, IE closes during installation process.
However, when I added AI_RUNNING_STATE="Running" in the "Condition" field, it didn't work.
I thought AI_RUNNING_STATE checks to see "if it is running". But maybe I didn't understand it correctly.
Please advise. Thank you.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Question on detecting and shutting down running browsers

Hi and welcome to Advanced Installer forums.

The approach you tried is the good one, however the correct property is [AI_PROCESS_STATE] and if you want to use it as a condition, you should first run the "Detect process" custom action because this custom action sets the [AI_PROCESS_STATE] property to "Running" or "Stopped", depending on the state of the process.

A detailed step by step scenario is described in the Custom Launch Condition Help thread which may be helpful for you.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mhchoi
Posts: 3
Joined: Wed Jul 31, 2013 8:39 am

Re: Question on detecting and shutting down running browsers

It worked well as i follow your instruction.

Btw, here's one more question.
Can i put two or more process names in Process Name field?
For example,

'a.exe | b.exe | c.exe'

Thanks!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Question on detecting and shutting down running browsers

Hi,

I'm glad you got this working.

I'm afraid that only one process name is supported by the "Detect process" custom action, because the state of that process is returned in the [AI_PROCESS_STATE] property. To detect more processes you can create more custom actions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mhchoi
Posts: 3
Joined: Wed Jul 31, 2013 8:39 am

Re: Question on detecting and shutting down running browsers

Thank you for your reply!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Question on detecting and shutting down running browsers

You're welcome.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”