Win32Service slaveService = services.getService(id);
if(slaveService!=null) {
listener.getLogger().println(Messages.ManagedWindowsServiceLauncher_StoppingService());
slaveService.StopService();
listener.getLogger().println(Messages.ManagedWindowsServiceLauncher_UnregisteringService());
slaveService.Delete();
}
//destroy session to free the socket
JISession.destroySession(session);
} catch (UnknownHostException e) {
e.printStackTrace(listener.error(e.getMessage()));