1

I have created the setup with WIX installer 3, which installs windows service.

It installs the service fine but when i uninstall it the service not removed.

  • I'm using ServiceInstall and ServiceControl.

    i'm using the servicecontrol only for uninstalling the service and not for start.

  • although uninstall process run smoothly, the service is not deleted.
  • Log doesn't show errors.
  • Folder is empty of files after finishing uninstall.
  • the service is not running during uninstall - so no issue of stuck process.
  • the setup run on clean environment which i preserved in advance.
  • i already tried replacing all GUID of all components in my setup.

can some one point on what i'm doing wrong in the code or suggest another solution.

Here is the code:

Component Id="ServiceComponentMain" Guid="{B652D08C-B99D-4CAC-9BCB-A48DF2356C9B}">
    <File Id="ApiProxy.Service.exe" KeyPath="yes" Source="$(var.BasePath)\ApiProxy.Service.exe" />        
    <ServiceInstall
      Id="ServiceComponentMain"
      Type="ownProcess"
      Vital="yes"
      Name="ApiProxy"
      DisplayName="ApiProxy"
      Start="auto"
      Account="LocalSystem"
      ErrorControl="critical"
      Interactive="no"/>
    <ServiceControl Id="StartService" Name="ServiceComponentMain" Stop="both" Remove="uninstall" Wait="yes" />
</Component>

and here is the log:

Action ended 13:51:46: InstallInitialize. Return value 1.
MSI (s) (84:18) [13:51:46:547]: Doing action: ProcessComponents
Action 13:51:46: ProcessComponents. Updating component registration
Action start 13:51:46: ProcessComponents.
1: Updating component registration 
Action ended 13:51:46: ProcessComponents. Return value 1.
MSI (s) (84:18) [13:51:46:563]: Doing action: UnpublishFeatures
Action 13:51:46: UnpublishFeatures. Unpublishing Product Features
Action start 13:51:46: UnpublishFeatures.
UnpublishFeatures: Feature: Unpublishing Product Features
Action ended 13:51:46: UnpublishFeatures. Return value 1.
MSI (s) (84:18) [13:51:46:568]: Doing action: StopServices
Action 13:51:46: StopServices. Stopping services
Action start 13:51:46: StopServices.
StopServices: Service: Stopping services
Action ended 13:51:46: StopServices. Return value 1.
MSI (s) (84:18) [13:51:46:577]: Doing action: DeleteServices
Action 13:51:46: DeleteServices. Deleting services
Action start 13:51:46: DeleteServices.
DeleteServices: Service: Deleting services
Action ended 13:51:46: **DeleteServices. Return value 1**.
MSI (s) (84:18) [13:51:46:662]: Doing action: RemoveFiles
Action 13:51:46: RemoveFiles. Removing files
Action start 13:51:46: RemoveFiles.
MSI (s) (84:18) [13:51:46:664]: Note: 1: 2205 2:  3: RemoveFile 
RemoveFiles: File: Removing files, Directory: 
MSI (s) (84:18) [13:51:46:677]: Note: 1: 2205 2:  3: RemoveFile 
Action ended 13:51:46: RemoveFiles. Return value 0.
MSI (s) (84:18) [13:51:46:678]: Doing action: RemoveFolders
Action 13:51:46: RemoveFolders. Removing folders
Action start 13:51:46: RemoveFolders.
RemoveFolders: Folder: Removing folders
Action ended 13:51:46: RemoveFolders. Return value 1.

1 Answer 1

2

The name given in the ServiceControl element should match the name of the service as given in the ServiceInstall element.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.