How can I stop my service when uninstalling in Win7 or Vista with UAC from WIX? When I delete my service from the control panel in Win7 or Vista using UAC, I always get the message "File in use". How can I stop it so that the message does not appear? I have this code on Wix:
<ServiceInstall Id='MyServiceInstall' DisplayName='OnPremises Gateway' Name='OPGatewayService'
ErrorControl='normal' Start='auto' Type='ownProcess' Vital='yes' Account='NT AUTHORITY\NetworkService' />
<ServiceControl Id="StartOPGatewayServiceControl" Name="OPGatewayService" Wait="no" Start="install" />
<ServiceControl Id="StopOPGatewayServiceControl" Name="OPGatewayService" Stop="both" Wait="yes" Remove="uninstall"/>
Thanks Adriana
source
share