I have authored an Windows Installer package from the ground up that installs two services.

Copy/paste from ServiceInstall Table:

IRIS_WatchDog_Service IRIS WatchDog Service IRIS WatchDog Service 16 2 1 IRIS ObjectCache Service c_calc09_IRIS.WatchDog.Service.exe

IRIS_ObjectCache_Service IRIS ObjectCache Service IRIS ObjectCache Service 16 2 1 c_calc08_IRIS.Net.ObjectCache.Service.exe

IRIS WatchDog Service has IRIS ObjectCache Service as a dependency.

Copy/paste from the ServiceControl Table:

IRIS_WatchDog_Service IRIS WatchDog Service 163 c_calc09_IRIS.WatchDog.Service.exe
IRIS_ObjectCache_Service IRIS ObjectCache Service 163 c_calc08_IRIS.Net.ObjectCache.Service.exe

This installs just fine and everything works as expected. Both services start up and the dependency link is correct.

The problem: When you attempt to uninstall the MSI it simply errors out with a 1603 and absolutely no further information. The log simply looks like this:

MSI (s) (20:94) [16:45:46:454]: Grabbed execution mutex.
MSI (s) (20:D0) [16:45:46:455]: MainEngineThread is returning 1603
MSI (s) (20:94) [16:45:46:455]: User policy value 'DisableRollback' is 0
MSI (s) (20:94) [16:45:46:455]: Machine policy value 'DisableRollback' is 0
MSI (s) (20:94) [16:45:46:455]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (20:94) [16:45:46:455]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (20:94) [16:45:46:456]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (20:94) [16:45:46:457]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (20:94) [16:45:46:457]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (20:94) [16:45:46:457]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (20:94) [16:45:46:457]: Restoring environment variables
MSI (c) (D8:BC) [16:45:46:460]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (D8:BC) [16:45:46:460]: MainEngineThread is returning 1603
=== Verbose logging stopped: 1/28/2016  16:45:46 ===

Doesn't tell me anything.

If I manually stop the IRIS WatchDog Service and try uninstalling again it runs the uninstall (stops the IRIS ObjectCache Service successfully).

I was wondering if something was wrong with the IRIS WatchDog Service, but that did not make much sense. After quite a bit of trial and error I discovered that when I removed the Service dependency and tried again it would uninstall just fine. It then stops both the services, deletes them and uninstalls the product without any problems.

It this a bug? Has anyone experienced the same thing?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1
You've missed my point.

If you're expecting WI to say "Oh, this service has a dependent which this package installed and is only used by this service, therefore I can uninstall it too", well you're SOL. It's still not a bug, it's simply not something that's implemented. Maybe pop on to MSDN and suggest it to the WI team?

Meanwhile, as you say, this is your package so it's down to you to control its behaviour.
Answered 01/29/2016 by: VBScab
Red Belt

  • But you can uninstall it just fine, as long as it is not running at the time. Also, it's not the service that IS a dependency to another service that is causing the problem, it is the service that has a dependency. If your concerns were valid it should be the other way around.

    The problem now is I cannot control the behavior the way I want to :(

    Anyway, I appreciate your input.
  • Side note, is there even a Windows Installer team anymore? How would I get in contact with anyone at Microsoft that works with Windows Installer?
Please log in to comment

Answers

0
Not a bug, no, just a cautious approach.

If it blindly went ahead and removed dependencies, it might remove system services, something that your users might not appreciate.

This is part of the Packager's job: to recognise what's required to fully install and uninstall applications whilst having the least impact on the target system.
Answered 01/29/2016 by: VBScab
Red Belt

  • This makes no sense. Both services comes from my windows installer package. They are not system services, they don't have any system services as dependencies.

    It must be a bug because otherwise using dependencies within your installer simply means that all the functionality you get from ServiceControl Table is useless.

    Also, if it was a cautious approach you'd assume you'd get some sort of warning or error message saying you cannot uninstall because a service dependency is running. Additionally if it was a cautious approach you shouldn't be able to uninstall at all, regardless of the running state of the service. Neither is the case as I can uninstall the package just fine as long as I stop the service that has a dependency.
Please log in to comment
Answer this question or Comment on this question for clarity