Nadav_r
Posts: 3
Joined: Fri Apr 26, 2013 2:22 am

Custom Launch Condition Help

Hi,
I am building an installer with your great product.
I have a question - I want to define a launch condition, for the installer to stop
if the application MSTSC.exe is running on the system.
I want to either confirm the user for automatic process kill, or display an error
message asking the user to close the running application and click a retry button.
How would I be able to do that?
Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Launch Condition Help

Hi,

In order to achieve this you can follow the steps below which are also captured in the "Detect and stop external process during installation" video:
- go in the Custom Actions page and add a "Detect process" custom action above the "Wizard Dialogs Stage -> Searches" action group
- in the "Action Data" text field, write the name of the process that you want to be detected (in your case MSTSC.exe)
- add a "Display message box" custom action under the "Detect process" custom action with the following settings:

Code: Select all

MSTSC.exe is running. Do you want to stop it automatically?
- set the following condition for the "Display message box" custom action: AI_PROCESS_STATE = "Running"
- add a "Terminate process" custom action under the "Display message box" custom action and in the "Action Data" text field write the name of the process that you want to stop
- set the following condition for the "Terminate process" custom action: BTN_PRESSED = "IDYES"
- build and run the project

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
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Custom Launch Condition Help

Great.

:D :D :D
K

Return to “Building Installers”