views:

190

answers:

1

Hi,

How can i stop my service at uninstall in Win7 or Vista with UAC on from WIX? When i uninstall my service from Control Panel in Win7 or Vista with UAC on I always get "File is in use message". How can i stop it so that message won't appear? I have this code in 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"/>

Thank you, Adriana

A: 

Unfortunately, the "File in use" detection is early. Check out the MSI SDK documentation about their interaction: http://msdn.microsoft.com/en-us/library/aa372466(VS.85).aspx

Rob Mensching