Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon.csproj
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon.csproj	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon.csproj	(revision 5780)
@@ -63,5 +63,7 @@
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Configuration.Install" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Management" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -82,4 +84,10 @@
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="TrayIconInstaller.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="TrayIconInstaller.Designer.cs">
+      <DependentUpon>TrayIconInstaller.cs</DependentUpon>
+    </Compile>
     <EmbeddedResource Include="MainWindow.resx">
       <DependentUpon>MainWindow.cs</DependentUpon>
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/Program.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/Program.cs	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/Program.cs	(revision 5780)
@@ -1,3 +1,4 @@
 ﻿using System;
+using System.Diagnostics;
 using System.Windows.Forms;
 using HeuristicLab.Clients.Hive.SlaveCore.Views;
@@ -10,4 +11,6 @@
     [STAThread]
     static void Main() {
+      KillOtherInstances();
+
       Application.EnableVisualStyles();
       Application.SetCompatibleTextRenderingDefault(false);
@@ -18,4 +21,26 @@
       Application.Run();
     }
+
+    /// <summary>
+    /// kill all other slave tray icons, we only want 1 running at a time
+    /// (and if a newer version is installed the older one should be killed)
+    /// </summary>
+    private static void KillOtherInstances() {
+      Process curProc = Process.GetCurrentProcess();
+
+      try {
+        Process[] procs = Process.GetProcessesByName(curProc.ProcessName);
+        foreach (Process p in procs) {
+          if (p.Id != curProc.Id) {
+            p.Kill();
+          }
+        }
+      }
+      catch (InvalidOperationException) {
+      }
+      catch (Exception) {
+        MessageBox.Show("There is another instance of the Hive Slave tray icon running which can't be closed.", "HeuristicLab Hive Slave");
+      }
+    }
   }
 }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/TrayIconInstaller.Designer.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/TrayIconInstaller.Designer.cs	(revision 5780)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/TrayIconInstaller.Designer.cs	(revision 5780)
@@ -0,0 +1,31 @@
+﻿namespace HeuristicLab.Clients.Hive.SlaveCore.SlaveTrayIcon {
+  partial class TrayIconInstaller {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      components = new System.ComponentModel.Container();
+    }
+
+    #endregion
+  }
+}
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/TrayIconInstaller.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/TrayIconInstaller.cs	(revision 5780)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/TrayIconInstaller.cs	(revision 5780)
@@ -0,0 +1,20 @@
+﻿using System.Collections;
+using System.ComponentModel;
+using System.Diagnostics;
+
+
+namespace HeuristicLab.Clients.Hive.SlaveCore.SlaveTrayIcon {
+  [RunInstaller(true)]
+  public partial class TrayIconInstaller : System.Configuration.Install.Installer {
+
+    public TrayIconInstaller() {
+      InitializeComponent();
+    }
+
+    public override void Commit(IDictionary savedState) {
+      base.Commit(savedState);
+      //TODO: disable on quiet install (for admins)?
+      Process.Start(Context.Parameters["TARGETDIR"].ToString() + "HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon.exe");
+    }
+  }
+}
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/ProjectInstaller.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/ProjectInstaller.cs	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/ProjectInstaller.cs	(revision 5780)
@@ -1,8 +1,6 @@
 ﻿using System;
 using System.Collections;
-using System.Collections.Generic;
 using System.ComponentModel;
-using System.Configuration.Install;
-using System.Linq;
+using System.ServiceProcess;
 
 
@@ -13,4 +11,16 @@
       InitializeComponent();
     }
+
+    protected override void OnAfterInstall(IDictionary savedState) {
+      base.OnAfterInstall(savedState);
+
+      //try to start the service after installation
+      using (var serviceController = new ServiceController(this.serviceInstaller1.ServiceName, Environment.MachineName)) {
+        try {
+          serviceController.Start();
+        }
+        catch { }
+      }
+    }
   }
 }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/SlaveWindowsService.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/SlaveWindowsService.cs	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/SlaveWindowsService.cs	(revision 5780)
@@ -43,4 +43,5 @@
     protected override void OnStart(string[] args) {
       core = new Core();
+      core.ServiceEventLog = eventLog;
       coreThread = new Thread(core.Start);
       coreThread.Start();
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup.vdproj
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup.vdproj	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup.vdproj	(revision 5780)
@@ -52,10 +52,4 @@
         "Entry"
         {
-        "MsmKey" = "8:_01440FC6C110EF86D1057E965F8A00D4"
-        "OwnerKey" = "8:_A33A66CD24EA6F2EB8BC0C7B0374C7AC"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_1078CDBED9F033A8F8092D70EE698E9A"
         "OwnerKey" = "8:_259AB1050A9B0A12646AAB03ED49AE98"
@@ -1086,4 +1080,10 @@
         "MsmKey" = "8:_9501231212CB8897345E5D8F6F31FBE4"
         "OwnerKey" = "8:_1078CDBED9F033A8F8092D70EE698E9A"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -1650,4 +1650,18 @@
         "CustomAction"
         {
+            "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_090B515D4B724A818341AB77211C562A"
+            {
+            "Name" = "8:Primary output from HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon (Active)"
+            "Condition" = "8:"
+            "Object" = "8:_E425C85EBBC047D2944046574F2FB159"
+            "FileType" = "3:2"
+            "InstallAction" = "3:2"
+            "Arguments" = "8:"
+            "EntryPoint" = "8:"
+            "Sequence" = "3:2"
+            "Identifier" = "8:_4C9B3289_4A7B_4468_A3E6_104B233F7A07"
+            "InstallerClass" = "11:TRUE"
+            "CustomActionData" = "8:/TARGETDIR=\"[TARGETDIR]\\\""
+            }
             "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_96A6A0924F6E4EB3A650D99CE94D954B"
             {
@@ -1664,4 +1678,18 @@
             "CustomActionData" = "8:"
             }
+            "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_97CB3FDA08444695B30FF01C7FC1C057"
+            {
+            "Name" = "8:Primary output from HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon (Active)"
+            "Condition" = "8:"
+            "Object" = "8:_E425C85EBBC047D2944046574F2FB159"
+            "FileType" = "3:2"
+            "InstallAction" = "3:1"
+            "Arguments" = "8:"
+            "EntryPoint" = "8:"
+            "Sequence" = "3:2"
+            "Identifier" = "8:_01C278BC_EA31_4977_B1CF_D61C0E4FDD5A"
+            "InstallerClass" = "11:TRUE"
+            "CustomActionData" = "8:/TARGETDIR=\"[TARGETDIR]\\\""
+            }
             "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_BA4B4CE24A6A4AF5B9E15838A4E3A2DA"
             {
@@ -2411,4 +2439,24 @@
             "IsolateTo" = "8:"
             }
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_98295B7BD0CC41ED881E9A9207EF6DB4"
+            {
+            "SourcePath" = "8:..\\HeuristicLab.Clients.Hive.Slave.Views\\3.4\\hive_icon.ico"
+            "TargetName" = "8:hive_icon.ico"
+            "Tag" = "8:"
+            "Folder" = "8:_8564EC48868C45BDB6F26256DBC6B288"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
             "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9ADCBD11412B8CF88989271EC4E87418"
             {
@@ -2773,5 +2821,5 @@
             {
             "Name" = "8:#1919"
-            "AlwaysCreate" = "11:FALSE"
+            "AlwaysCreate" = "11:TRUE"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
@@ -2779,4 +2827,15 @@
                 "Folders"
                 {
+                    "{9EF0B969-E518-4E46-987F-47570745A589}:_EB172448DA454A1EACE198BCA7BC8A03"
+                    {
+                    "Name" = "8:HeuristicLab Hive Slave"
+                    "AlwaysCreate" = "11:FALSE"
+                    "Condition" = "8:"
+                    "Transitive" = "11:FALSE"
+                    "Property" = "8:_1D3268864FFD419CAAC685DE6DBCA87D"
+                        "Folders"
+                        {
+                        }
+                    }
                 }
             }
@@ -2796,7 +2855,7 @@
         {
         "Name" = "8:Microsoft Visual Studio"
-        "ProductName" = "8:HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup"
+        "ProductName" = "8:HeuristicLab Hive Slave"
         "ProductCode" = "8:{83D128A1-4766-4B19-A449-15B0A1969B99}"
-        "PackageCode" = "8:{B313D301-3AE8-4CAB-A254-CFC5B15E6984}"
+        "PackageCode" = "8:{E16E0DDF-7849-45C1-8379-6F7070E7248C}"
         "UpgradeCode" = "8:{F27A07F7-B96C-4375-B9C2-6623E5C2B03E}"
         "AspNetVersion" = "8:4.0.30319.0"
@@ -2805,15 +2864,15 @@
         "DetectNewerInstalledVersion" = "11:TRUE"
         "InstallAllUsers" = "11:TRUE"
-        "ProductVersion" = "8:1.0.0"
+        "ProductVersion" = "8:3.3.5"
         "Manufacturer" = "8:HEAL"
         "ARPHELPTELEPHONE" = "8:"
         "ARPHELPLINK" = "8:"
-        "Title" = "8:HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup"
+        "Title" = "8:HeuristicLab Hive Slave Installer"
         "Subject" = "8:"
         "ARPCONTACT" = "8:HEAL"
         "Keywords" = "8:"
         "ARPCOMMENTS" = "8:"
-        "ARPURLINFOABOUT" = "8:"
-        "ARPPRODUCTICON" = "8:"
+        "ARPURLINFOABOUT" = "8:http://dev.heuristiclab.com"
+        "ARPPRODUCTICON" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
         "ARPIconIndex" = "3:0"
         "SearchPath" = "8:"
@@ -2918,4 +2977,18 @@
         "Shortcut"
         {
+            "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_165C7319BB1047F2BDEEACA5E0377DC5"
+            {
+            "Name" = "8:HeuristicLab Hive Slave"
+            "Arguments" = "8:"
+            "Description" = "8:"
+            "ShowCmd" = "3:1"
+            "IconIndex" = "3:0"
+            "Transitive" = "11:FALSE"
+            "Target" = "8:_E425C85EBBC047D2944046574F2FB159"
+            "Folder" = "8:_EB172448DA454A1EACE198BCA7BC8A03"
+            "WorkingFolder" = "8:_8564EC48868C45BDB6F26256DBC6B288"
+            "Icon" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
+            "Feature" = "8:"
+            }
         }
         "UserInterface"
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 5780)
@@ -114,5 +114,5 @@
     private void StartHeartbeats() {
       //Initialize the heartbeat     
-      if (heartbeatManager != null) {
+      if (heartbeatManager == null) {
         heartbeatManager = new HeartbeatManager { Interval = new TimeSpan(0, 0, 10) };
         heartbeatManager.StartHeartbeat();
