Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7131


Ignore:
Timestamp:
12/06/11 10:56:12 (12 years ago)
Author:
ascheibe
Message:

#1672 try to stop the slave service before uninstalling it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/ProjectInstaller.cs

    r6983 r7131  
    1010    public ProjectInstaller() {
    1111      InitializeComponent();
     12    }
     13
     14    protected override void OnBeforeUninstall(IDictionary savedState) {
     15      base.OnBeforeUninstall(savedState);
     16
     17      //try to shutdown the service before uninstalling it
     18      using (var serviceController = new ServiceController(this.serviceInstaller1.ServiceName, Environment.MachineName)) {
     19        try {
     20          serviceController.Stop();
     21        }
     22        catch { }
     23      }
    1224    }
    1325
Note: See TracChangeset for help on using the changeset viewer.