Search code examples
windows-installerinstallshieldinstallscript

MSI InstallScript Project: How can I unistall the service's executable file?


I'm a newer with InstallShield and I have a MSI Installscript Project. I created a service to run in Window Services after installed. When I do the uninstall progress, the service is deleted, but the service's executable file is not be uninstalled.

How can I uninstall this file with its service?

Thanks for the help.


Solution

  • There should be settings for you to stop the service at uninstall time and say if you want to wait for the service to stop. If you didn't stop the service the uninstall may have asked for a reboot. The "stop service" and "delete service" settings are separate so one can happen but not the other. If you do stop it but don't wait for the service stop to complete that results in a race between the uninstall removing the files and the service process finishing. So timing can be an issue if the process stops being a service but continues to run doing cleanup or whatever, because if it's running it can't be removed. The service needs to be well behaved too. If it's reproducible do the uninstall with a verbose MSI log.

    That's the services thing, but there are the ordinary Windows Installer issue, such as marking the exe explicitly shared so that it won't remove it, thinking it's used by something else.