This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Close running process
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 18, 2007
05:39 PM
Close running process
I've utilized the following ideas obtained from http://www.installsite.org/pages/en/isp_ext.htm to close a running application upon uninstall (an EXE that lives within the System Tray), but it doesn't work on Vista, if uninstalling via Programs and Features- Uninstall.
What would be a more modern approach to closing a running application upon uninstall?
btw, if you follow the link, look for: List and Shut Down Running Applications
What would be a more modern approach to closing a running application upon uninstall?
btw, if you follow the link, look for: List and Shut Down Running Applications
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 18, 2007
05:52 PM
I didn't look at the code sample but I can give you some options.
One way is to send a WM_CLOSE message to the applications main window. This will require you to find the window handle but FindWindow in the Windows API should work well.
Another way is to call TerminateProcess. This requires the process handle so you'll need to use EnumProcesses to find the application.
One way is to send a WM_CLOSE message to the applications main window. This will require you to find the window handle but FindWindow in the Windows API should work well.
Another way is to call TerminateProcess. This requires the process handle so you'll need to use EnumProcesses to find the application.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2007
06:15 AM
Where in the sequence are you calling the custom action? Should be in the Install execute sequence. It may require elevated permissions so try "deferred in system context".
Stefan Krueger
InstallSite.org
InstallSite.org
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)