0

I am struggling with very strange situation with wix installer. I have custom BA app which installs windows service and removes it on uninstall. On Win XP everything is working perfectly but on Win 10 service is not stopped and not removed though uninstallation processed successfully. In log files I cannot see any errors related to this. Any ideas?

This is service install configuration:

    <ServiceInstall
      Id="MyServiceInstaller"
      Type="ownProcess"
      Name="MyService"
      DisplayName="My Service"
      Description="My Service"
      Start="auto"
      Account="[SERVICEACCOUNT]"
      Password="[SERVICEPASSWORD]"
      ErrorControl="normal" />
    <ServiceControl Id="StartMyService"
            Name="MyService"
            Start="install"
            Wait="no" />
    <ServiceControl Id="StopMyService"
                    Name="MyService"
                    Stop="both"
                    Remove="uninstall"
                    Wait="yes" />
crocodayl
  • 99
  • 9
  • Can you post the log? A service is only stopped/removed if the component is being removed. – Christopher Painter May 18 '18 at 22:18
  • What is the state of the service when it remains after the uninstall? If it could not be correctly stopped or removed it might be marked disabled. – PhilDW May 19 '18 at 17:45
  • You should definitely post the log. I wonder if the two ServiceControl actions for the same service are interfering with each other. – PhilDW May 23 '18 at 16:58

1 Answers1

0

Round 2:

I jumped the gun here. As Chris says, we do need to see the log. I assumed the uninstall was hanging, which it does not seem to be at all.

  1. ARP: I suppose you should quickly check if there are two product entries in Add / Remove Programs first of all? (don't think that is the problem either - failed major upgrade).
  2. SharedDllRefCount: Is the SharedDllRefCount attribute set to yes for the service component? Please post the whole component markup, with all attributes specified - conditions and all. If the component was set permanent, that would explain things, but then the uninstall wouldn't work on XP. Enabling SharedDllRefCount sets the legacy ref-count here:
    • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
    • HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SharedDLLs
    • Some SharedDllRefCount cleanup details here: MSI not uninstalling .dll files
  3. Conditions Table: Are there any entries in the Condition table? (Feature conditions).

Round 1 (misunderstood the question - again - a couple of items still apply):

  1. Debug Logging: Perhaps try to run your uninstall with verbose, debug logging to see if you can get some more information about what the problem can be:

    msiexec.exe /x {ProductCode} /L*vx! C:\Your.log
    
  2. Security Software: Is there anti-virus or security software on the problem box? If so, try to disable it before you run the uninstall.

  3. Event Log: Maybe have a quick look for any clues in the event viewer? (Windows + Tap R. type eventvwr and pressOK). Check the different logs.

  4. Custom Actions: Do you have any custom actions that run on uninstall? If so, what type of custom action? Managed code?

  5. Service Credentials: Is the password for the service account still valid on that problem box? If worst comes to worst, can you log on with those service credentials (if that is possible) and try to start and stop the service to check for errors? Maybe even try to run the service with your own admin account? This is not ideal any of it, and should only be done to get to the bottom of this.


There have been a lot of service questions on StackOverflow lately. Here are some recent answers:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164