shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact:  Website

Checking for the running process and terminating the same

Fri Feb 21, 2014 6:43 am

Hi,

After looking at http://www.advancedinstaller.com/user-g ... ocess.html, I have written a sample aip file which does the following
- Checks whether the Outlook is running
- If it is running, then displays the message box
- Depending on the msgbox confirmation, terminates the process

I am facing following issues(may be I have done some mistakes), can you please help me in solving the same
- When I uninstall(Control panel->Add/remove), I do not get the message(because of which outlook.exe is not getting terminated)
- How can I stop the installation/uninstallation if the user clicks on "no" in the msgbox

I have also attached the sample aip file

Regards,
Rohan
Attachments
OutlookTest.aip
(12.02KiB)Downloaded 1085 times

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Checking for the running process and terminating the sam

Fri Feb 21, 2014 10:19 am

Hi Rohan,
When I uninstall(Control panel->Add/remove), I do not get the message(because of which outlook.exe is not getting terminated)
This is happening because your custom actions have been added in the Wizard Dialogs Stage. So, you need to add these custom actions in the Install Execution Stage too. You can use a drag and drop operation while the SHIFT key is pressed.
You can take a look on the Windows Installer Custom Actions article which may be useful to you.
- How can I stop the installation/uninstallation if the user clicks on "no" in the msgbox
In order to achieve that you can create a simple custom action which will run only if the NO button was pressed and that custom action stops the installation. I've attached to this post a zip archive that contains a sample which implements your scenario.

Please let us know if that helped.

Best regards,
Dan
Attachments
DetectProcess and terminateProcess.zip
(2.98KiB)Downloaded 1130 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact:  Website

Re: Checking for the running process and terminating the sam

Mon Feb 24, 2014 5:38 am

Thank you, it worked.

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Checking for the running process and terminating the sam

Mon Feb 24, 2014 7:38 am

You're welcome Rohan,

If there is anything else I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”