EnterpriseWebLibrary.InstallationSupportUtility.InstallationModel.ExistingInstallationLogic.UninstallServices C# (CSharp) Method

UninstallServices() public method

public UninstallServices ( ) : void
return void
        public void UninstallServices()
        {
            // Installutil tries to stop services during uninstallation, but doesn't report failure if a service doesn't stop. That's why we stop the services
            // ourselves first.
            stopServices();

            var allServices = ServiceController.GetServices();
            foreach( var service in runtimeConfiguration.WindowsServices.Where( s => allServices.Any( sc => sc.ServiceName == s.InstalledName ) ) )
                runInstallutil( service, true );
        }