Isn't your ServiceControl using a different name than your ServiceInstall? My installer is set to use the same name for both for each given service. Not seeing that consistency with your code, but not 100% sure it's critical. Might be worth a try. Here's an example that works 100%
<ServiceInstall Id="FMAuthServerServiceInstall" Name="FlowMan Authentication" Description="Authenticate users and other FlowMan services." Start="auto" Type="ownProcess" ErrorControl="normal" > <ServiceDependency Id="RPCSS" /> </ServiceInstall> <ServiceControl Id="FMAuthenticationStart" Name="FlowMan Authentication" Start="install" Stop="both" Remove="uninstall" Wait="yes"/> What I'm seeing in your code is MyWindowsServiceName being used in ServiceInstall And WixServiceInstaller being used in the two ServiceControl elements. -----Original Message----- From: Josh Pepper [mailto:josh.pep...@microsoft.com] Sent: Wednesday, April 01, 2009 1:29 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] ServiceInstall not removing service? Thanks for the reply Chad. I have the Remove="uninstall" set in the ServiceControl .... any other thoughts as to why it wouldn't remove the service on uninstall? I've included the relevant wxs below. Thanks Josh <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="WixProjectWindowsService"> <Component Id="MyWiXServiceComponent" Guid="21945E51-F096-46d7-8E09-43443D092391"> <File Id="WindowsService" Name="$(var.WindowsService1.TargetName)" Source="$(var.WindowsService1.TargetPath)" /> <File Id="ClassLibrary" Name="$(var.ClassLibrary1.TargetName)" Source="$(var.ClassLibrary1.TargetPath)" /> <ServiceInstall Id="MyWindowsServiceId" Name="MyWindowsServiceName" DisplayName="MyWindowsServiceDisplayName" Type="ownProcess" Start="auto" ErrorControl="normal" Description="This is a test service that only logs to the event log." Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" /> <ServiceControl Id="StartWixServiceInstaller" Name="WixServiceInstaller" Start="install" Wait="no" /> <ServiceControl Id="StopWixServiceInstaller" Name="WixServiceInstaller" Stop="both" Wait="yes" Remove="uninstall" /> </Component> </Directory> </Directory> </Directory> <Feature Id="ProductFeature" Title="WixProjectWindowsService" Level="1"> <ComponentRef Id="MyWiXServiceComponent" /> </Feature> -----Original Message----- From: Chad Petersen [mailto:chad.peter...@harlandfs.com] Sent: Wednesday, April 01, 2009 1:54 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] ServiceInstall not removing service? Hi Josh - Attachments don't come through on the mailing list, but I think you just need to add a ServiceControl element with a Remove="uninstall" attribute. Check it out and see if that helps. Chad -----Original Message----- From: Josh Pepper [mailto:josh.pep...@microsoft.com] Sent: Wednesday, April 01, 2009 10:22 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] ServiceInstall not removing service? Hi folks - I just made a very simple Hello World service install with ServiceInstall. It installed fine. But when I uninstalled, the service itself remained, despite the fact that the service exe was removed. It seems to be that the service should have been removed, or the MSI should have failed... I thought vital defaults to Yes, right? Or is that just for File? I've included my wxs file .... Thanks Josh ------------------------------------------------------------------------ ------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------ ------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users