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
- :
- BasicMSI How to stop an existing windows service using the events - is this possible?
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
‎Aug 23, 2016
10:38 AM
BasicMSI How to stop an existing windows service using the events - is this possible?
Hello,
Is it possible to add windows service to System configuration, Services that already exists. During an uninstall, I need to stop two Window services. I have a custom action that does this for me, but not enough time is allowed during the uninstall for the services to be stopped and deleted before hand. I usually end up with the reboot message which I'd like to avoid if possible. The reboot does work to clean up the window services, but it also leaves behind many files that could not be accessed during the uninstall process (files not installed by the original install). The uninstall works well if the services are stopped ahead of time. One other minor item, the product install folder never gets deleted either on an uninstall.
Thanks in advance for any reply.
Is it possible to add windows service to System configuration, Services that already exists. During an uninstall, I need to stop two Window services. I have a custom action that does this for me, but not enough time is allowed during the uninstall for the services to be stopped and deleted before hand. I usually end up with the reboot message which I'd like to avoid if possible. The reboot does work to clean up the window services, but it also leaves behind many files that could not be accessed during the uninstall process (files not installed by the original install). The uninstall works well if the services are stopped ahead of time. One other minor item, the product install folder never gets deleted either on an uninstall.
Thanks in advance for any reply.
(3) Replies

Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2016
05:05 AM
I was faced with a similar scenario during one of my product upgrade sequences where we had a particularly stubborn service to shut down. In the end I had to author custom actions to stop the service with various timeouts and ultimately even kill the service process in a 'dirty' shutdown if the stop timeouts were triggered.
I don't know of any other method - sorry.
I don't know of any other method - sorry.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2016
07:42 AM
Hysteresis wrote:
I was faced with a similar scenario during one of my product upgrade sequences where we had a particularly stubborn service to shut down. In the end I had to author custom actions to stop the service with various timeouts and ultimately even kill the service process in a 'dirty' shutdown if the stop timeouts were triggered.
I don't know of any other method - sorry.
I was able to use DirectEditor to add a record to table ServiceControl that resolved my uninstall issues. The two services involved had built in dependencies, so I only had to stop one of them to get them both stopped. I defined the record name in field s72, the service name in field s255, the stop service during uninstall event value of decimal 32 in field i2, the wait an additional 30 seconds (value 1) in field I2, and finally the component name in field s72 (the executable for the service).
The uninstall did not require a reboot after that and all the files got removed on an uninstall (clean uninstall). Well the product folder was left behind, but everything else is gone which is probably as good as it is going to get.:)

Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2016
07:54 AM
Glad you got it working. Thanks for the heads-up on your use of direct edit.
