- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Uninstall says "The following applications should be closed..."
- 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
Uninstall says "The following applications should be closed..."
My msi installer installs a Windows Service with
[Install Start; Uninstall Stop; Uninstall Delete]
Upon start, the service launches another app, also installed by the msi. All good so far.
When the service is stopped during an uninstall, it is prepared to gracefully shut down the launched app. A graceful shutdown is imperative. However, during uninstall, a dialog pops up saying "The following applications should be closed..." referring to the app the service launched. See the attached image.
I can add a custom action to kill the process on REMOVE="ALL", and that prevents the dialog from appearing, but killing the app also prevents a graceful shutdown, so this is not an option. The app is going to be stopped, but the service has to do it.
Is there any way I can prevent this dialog from appearing?
- Tags:
- uninstall
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @tbomgardner ,
- You can use KillProcess custom action that can terminate the process by configuring as given in link:https://docs.flexera.com/installshield26helplib/helplibrary/CAKillProcess.htm
- Sequence this before uninstallservice action so that it can be executed before uninstall service action
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jennifer, thank you for your reply. I'm sorry, I should have been more clear. As I explained, I cannot use KillProcess, as that will immediately terminate the process instead of allowing a graceful shutdown. The process must be terminated by the service, that is the only way to initiate a graceful shutdown. A graceful shutdown is imperative. What I need is a way to disable or bypass the dialog I mentioned in the OP.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Have you tried an InstallScript custom action using the ServiceStopService function?
HTH
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
HTH, it seems like ServiceStopService should have worked, I don't know why it didn't, but your suggestion to use InstallScript did lead to a solution. From the script, I was able to send a shutdown message as a <First Action> to the app in question. That meant the app was not running when msiexec checked, and therefore no "reboot needed" dialog popped up. Thank you!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @tbomgardner ,
Is the application you wanted Main service to shut down as well service?If so you can use ServiceStopServiceEx2 with bStopDependencies flag set to true.This feature got introduced since InstallShield 2018 R2.
Link to refer:https://docs.flexera.com/installshield24helplib/rn/ReleaseNotes.htm#enhance
Thanks,
Jenifer
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)