Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.ConsoleClient/3.3/app.config
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.ConsoleClient/3.3/app.config	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.ConsoleClient/3.3/app.config	(revision 8949)
@@ -126,4 +126,7 @@
         <value>2</value>
       </setting>
+      <setting name="ShutdownCommand" serializeAs="String">
+        <value>shutdown.exe</value>
+      </setting>
    </HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings>
   </userSettings>
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.Views/3.3/HeuristicLab.Clients.Hive.Slave.Views-3.3.csproj
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.Views/3.3/HeuristicLab.Clients.Hive.Slave.Views-3.3.csproj	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.Views/3.3/HeuristicLab.Clients.Hive.Slave.Views-3.3.csproj	(revision 8949)
@@ -291,5 +291,5 @@
   </PropertyGroup>
   <PropertyGroup>
-   <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
 set ProjectDir=$(ProjectDir)
 set SolutionDir=$(SolutionDir)
@@ -297,5 +297,5 @@
 
 call PreBuildEvent.cmd</PreBuildEvent>
-<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 export ProjectDir=$(ProjectDir)
 export SolutionDir=$(SolutionDir)
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/app.config
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/app.config	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/app.config	(revision 8949)
@@ -119,4 +119,7 @@
         <value>-1</value>
       </setting>
+      <setting name="ShutdownCommand" serializeAs="String">
+        <value>shutdown.exe</value>
+      </setting>
     </HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings>
   </userSettings>
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs	(revision 8949)
@@ -26,5 +26,4 @@
 using System.Threading.Tasks;
 using HeuristicLab.Clients.Hive.SlaveCore.Properties;
-using HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -76,5 +75,5 @@
         slaveComm = new ServiceHost(typeof(SlaveCommunicationService));
         slaveComm.Open();
-        
+
         // delete all left over task directories
         pluginManager.CleanPluginTemp();
@@ -96,5 +95,6 @@
         }
         ShutdownCore();
-      } finally {
+      }
+      finally {
         DeregisterServiceEvents();
         waitShutdownSem.Release();
@@ -185,4 +185,7 @@
             HeartbeatManager.Interval = TimeSpan.FromSeconds(interval);
           }
+          break;
+        case MessageContainer.MessageType.ShutdownComputer:
+          ShutdownComputer();
           break;
       }
@@ -450,4 +453,18 @@
     }
 
+    private void ShutdownComputer() {
+      Shutdown();
+
+      try {
+        Process.Start(Settings.Default.ShutdownCommand);
+      }
+      catch (Exception ex) {
+        if (ServiceEventLog != null) {
+          EventLogManager.LogException(ex);
+        } else
+          throw ex;
+      }
+    }
+
     /// <summary>
     /// complete shutdown, should be called before the the application is exited
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.Designer.cs
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.Designer.cs	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.Designer.cs	(revision 8949)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.530
+//     Runtime Version:4.0.30319.586
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -311,4 +311,16 @@
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("shutdown.exe")]
+        public string ShutdownCommand {
+            get {
+                return ((string)(this["ShutdownCommand"]));
+            }
+            set {
+                this["ShutdownCommand"] = value;
+            }
+        }
     }
 }
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.settings
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.settings	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.settings	(revision 8949)
@@ -75,4 +75,7 @@
       <Value Profile="(Default)">-1</Value>
     </Setting>
+    <Setting Name="ShutdownCommand" Type="System.String" Scope="User">
+      <Value Profile="(Default)">shutdown.exe</Value>
+    </Setting>
   </Settings>
 </SettingsFile>
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/app.config
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/app.config	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/app.config	(revision 8949)
@@ -122,4 +122,7 @@
         <value>-1</value>
       </setting>
+      <setting name="ShutdownCommand" serializeAs="String">
+        <value>shutdown.exe</value>
+      </setting>
     </HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings>
   </userSettings>
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs	(revision 8949)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.17379
+//     Runtime Version:4.0.30319.586
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -629,4 +629,7 @@
 
     [System.Runtime.Serialization.OptionalFieldAttribute()]
+    private HeuristicLab.Clients.Hive.DowntimeType DowntimeTypeField;
+
+    [System.Runtime.Serialization.OptionalFieldAttribute()]
     private System.DateTime EndDateField;
 
@@ -652,4 +655,17 @@
           this.AllDayEventField = value;
           this.RaisePropertyChanged("AllDayEvent");
+        }
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public HeuristicLab.Clients.Hive.DowntimeType DowntimeType {
+      get {
+        return this.DowntimeTypeField;
+      }
+      set {
+        if ((this.DowntimeTypeField.Equals(value) != true)) {
+          this.DowntimeTypeField = value;
+          this.RaisePropertyChanged("DowntimeType");
         }
       }
@@ -1286,4 +1302,15 @@
 
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "DowntimeType", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataAccess")]
+  public enum DowntimeType : int {
+
+    [System.Runtime.Serialization.EnumMemberAttribute()]
+    Offline = 0,
+
+    [System.Runtime.Serialization.EnumMemberAttribute()]
+    Shutdown = 1,
+  }
+
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "Permission", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
   public enum Permission : int {
@@ -1613,4 +1640,7 @@
       [System.Runtime.Serialization.EnumMemberAttribute()]
       NewHBInterval = 11,
+
+      [System.Runtime.Serialization.EnumMemberAttribute()]
+      ShutdownComputer = 12,
     }
   }
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs	(revision 8949)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.239
+//     Runtime Version:4.0.30319.586
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
Index: /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/app.config
===================================================================
--- /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/app.config	(revision 8948)
+++ /branches/SlaveShutdown/HeuristicLab.Clients.Hive/3.3/app.config	(revision 8949)
@@ -1,79 +1,62 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
-  <configSections>
-    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
-      <section name="HeuristicLab.Clients.Hive.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-    </sectionGroup>
-  </configSections>
-  <applicationSettings>
-    <HeuristicLab.Clients.Hive.Settings>
-      <setting name="MaxParallelUploads" serializeAs="String">
-        <value>4</value>
-      </setting>
-      <setting name="HLBinaryName" serializeAs="String">
-        <value>HeuristicLab 3.3.exe</value>
-      </setting>
-      <setting name="ResultPollingInterval" serializeAs="String">
-        <value>00:00:20</value>
-      </setting>
-      <setting name="MaxParallelDownloads" serializeAs="String">
-        <value>2</value>
-      </setting>
-      <setting name="MaxRepeatServiceCalls" serializeAs="String">
-        <value>5</value>
-      </setting>
-      <setting name="AnonymousUserName" serializeAs="String">
-        <value>anonymous</value>
-      </setting>
-    </HeuristicLab.Clients.Hive.Settings>
-  </applicationSettings>
-  <system.serviceModel>
-    <behaviors>
-      <endpointBehaviors>
-        <behavior name="HiveBehaviorConfiguration">
-          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
-        </behavior>
-      </endpointBehaviors>
-    </behaviors>
-    <bindings>
-      <wsHttpBinding>
-        <binding name="wsHttpBinding_Hive"
-                 closeTimeout="00:01:00"
-                 openTimeout="00:01:00"
-                 receiveTimeout="00:20:00"
-                 sendTimeout="00:20:00"
-                 bypassProxyOnLocal="false"
-                 transactionFlow="false"
-                 hostNameComparisonMode="StrongWildcard"
-                 maxBufferPoolSize="2147483647"
-                 maxReceivedMessageSize="2147483647"
-                 messageEncoding="Text"
-                 textEncoding="utf-8"
-                 useDefaultWebProxy="true"
-                 allowCookies="false">
-
-          <readerQuotas maxDepth="2147483647"
-                        maxStringContentLength="2147483647"
-                        maxArrayLength="2147483647"
-                        maxBytesPerRead="2147483647"
-                        maxNameTableCharCount="2147483647"/>
-          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
-          <security mode="Message">
-            <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
-            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default"/>
-          </security>
-        </binding>
-      </wsHttpBinding>
-    </bindings>
-    <client>
-      <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
-        <identity>
-          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
-        </identity>
-      </endpoint>
-    </client>
-  </system.serviceModel>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
-  </startup>
+    <configSections>
+        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+            <section name="HeuristicLab.Clients.Hive.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+        </sectionGroup>
+    </configSections>
+    <system.serviceModel>
+        <bindings>
+            <wsHttpBinding>
+                <binding name="WSHttpBinding_IHiveService" closeTimeout="00:01:00"
+                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
+                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
+                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
+                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
+                    allowCookies="false">
+                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
+                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
+                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
+                        enabled="false" />
+                    <security mode="Message">
+                        <transport clientCredentialType="Windows" proxyCredentialType="None"
+                            realm="" />
+                        <message clientCredentialType="UserName" negotiateServiceCredential="true"
+                            algorithmSuite="Default" />
+                    </security>
+                </binding>
+            </wsHttpBinding>
+        </bindings>
+        <client>
+            <endpoint address="http://localhost/Hive-3.3/HiveService.svc"
+                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService"
+                contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_IHiveService">
+                <identity>
+                    <certificate encodedValue="AwAAAAEAAAAUAAAAQkazTmWcZqFuuREaov8jmDtOu4UgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhAVedIj+0w6jEdhZErAeemyMAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTExMDkwNjA4NDUzOVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiKeSwXFm0qxkuMFao9NHftClUYvX0jpiyKFthUnutfhB2FF3Ie8a8U15M+GBYSZOV5vXlEn3D30HsV/x6L9/UU1fiJndJd5lWI2/4mP2jra0qP0b8xyitHfRhePIfpDkufZqIOvOmT/DoFqMTK3joexzuEmAw5Ugil6fbOxELlwIDAQABo0kwRzBFBgNVHQEEPjA8gBCJmAWIXCTyTFXdjdnseED4oRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghAVedIj+0w6jEdhZErAeemyMAkGBSsOAwIdBQADgYEACW9nLJnu1+OJg93AAKfWqkiETHcXUcULrPjMWJQsy5fkHY1qExKBGeUJHK0REvqQs3KRY3GqikMjlAnDmb/e9P1h+PynsRv7y2zAGCnKW4nryWVncWf1xJL9xvKNuH2aR4+Wdq9oo2m793+RXtA7YTSsr/OiiIdkQcjUGQtkaYo=" />
+                </identity>
+            </endpoint>
+        </client>
+    </system.serviceModel>
+    <applicationSettings>
+        <HeuristicLab.Clients.Hive.Settings>
+            <setting name="MaxParallelUploads" serializeAs="String">
+                <value>4</value>
+            </setting>
+            <setting name="HLBinaryName" serializeAs="String">
+                <value>HeuristicLab 3.3.exe</value>
+            </setting>
+            <setting name="ResultPollingInterval" serializeAs="String">
+                <value>00:00:20</value>
+            </setting>
+            <setting name="MaxParallelDownloads" serializeAs="String">
+                <value>2</value>
+            </setting>
+            <setting name="MaxRepeatServiceCalls" serializeAs="String">
+                <value>5</value>
+            </setting>
+            <setting name="AnonymousUserName" serializeAs="String">
+                <value>anonymous</value>
+            </setting>
+        </HeuristicLab.Clients.Hive.Settings>
+    </applicationSettings>
 </configuration>
