cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tbomgardner
Level 3

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?

Labels (1)
0 Kudos
(5) Replies
Jenifer
Flexera Alumni

Hi @tbomgardner ,

 

Thanks,

Jenifer

0 Kudos

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.

0 Kudos

Have you tried an InstallScript custom action using the ServiceStopService  function?

https://docs.flexera.com/installshield19helplib/Subsystems/installshield19langref/helplibrary/ServiceStopService.htm

HTH

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!

0 Kudos

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

0 Kudos