Index: /trunk/include/VBox/VBoxGuestLib.h
===================================================================
--- /trunk/include/VBox/VBoxGuestLib.h	(revision 27702)
+++ /trunk/include/VBox/VBoxGuestLib.h	(revision 27703)
@@ -508,9 +508,12 @@
 # endif /* VBOX_WITH_GUEST_PROPS defined */
 
+# ifdef VBOX_WITH_GUEST_CONTROL
 /** @name Guest control
  * @{ */
 VBGLR3DECL(int)     VbglR3GuestCtrlConnect(uint32_t *pu32ClientId);
 VBGLR3DECL(int)     VbglR3GuestCtrlDisconnect(uint32_t u32ClientId);
-/** @}  */
+VBGLR3DECL(int)     VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *pMsg, void **ppvData, uint32_t *pcbData);
+/** @}  */
+# endif /* VBOX_WITH_GUEST_CONTROL defined */
 
 /** @name User credentials handling
Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	(revision 27702)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	(revision 27703)
@@ -91,5 +91,6 @@
 VBoxGuestR3Lib_DEFS        = \
 	VBOX_WITH_HGCM \
-	$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,)
+	$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
+	$(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,)
 VBoxGuestR3Lib_SOURCES     = \
 	VBoxGuestR3Lib.cpp \
Index: /trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk	(revision 27702)
+++ /trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk	(revision 27703)
@@ -42,7 +42,5 @@
  endif
 ifdef VBOX_WITH_GUEST_CONTROL
- if1of ($(KBUILD_TARGET), win)
-  VBoxService_DEFS       += VBOXSERVICE_CONTROL
- endif
+  VBoxService_DEFS       += VBOX_WITH_GUEST_CONTROL
 endif
 endif
@@ -58,8 +56,6 @@
 	VBoxServiceStats.cpp
 ifdef VBOX_WITH_GUEST_CONTROL
- if1of ($(KBUILD_TARGET), win)
-  VBoxService_SOURCES    += \
+ VBoxService_SOURCES    += \
 	VBoxServiceControl.cpp
- endif
 endif
 ifdef VBOX_WITH_GUEST_PROPS
Index: /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 27702)
+++ /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 27703)
@@ -45,4 +45,5 @@
  	$(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \
  	$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS) \
+	$(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL) \
  	$(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API)
  VBoxManage_DEFS.win   = _WIN32_WINNT=0x0500
@@ -63,4 +64,5 @@
  	VBoxManageDisk.cpp \
  	$(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \
+	$(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp) \
  	VBoxManageHelp.cpp \
  	VBoxManageHostonly.cpp \
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 27702)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 27703)
@@ -385,4 +385,7 @@
         { "guestproperty",    handleGuestProperty },
 #endif
+#ifdef VBOX_WITH_GUEST_CONTROL
+        { "guestcontrol",     handleGuestControl },
+#endif
         { "metrics",          handleMetrics },
         { "import",           handleImportAppliance },
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 27702)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 27703)
@@ -94,4 +94,7 @@
 #define USAGE_STORAGEATTACH         RT_BIT_64(49)
 #define USAGE_STORAGECONTROLLER     RT_BIT_64(50)
+#ifdef VBOX_WITH_GUEST_CONTROL
+#define USAGE_GUESTCONTROL          RT_BIT_64(51)
+#endif  /* VBOX_WITH_GUEST_CONTROL defined */
 #define USAGE_ALL                   (~(uint64_t)0)
 /** @} */
@@ -168,4 +171,8 @@
 #ifndef VBOX_ONLY_DOCS
 extern int handleGuestProperty(HandlerArg *a);
+
+/* VBoxManageGuestCtrl.cpp */
+extern int handleGuestControl(HandlerArg *a);
+extern void usageGuestControl(void);
 
 /* VBoxManageVMInfo.cpp */
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 27702)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 27703)
@@ -588,4 +588,9 @@
 #endif /* VBOX_WITH_GUEST_PROPS defined */
 
+#ifdef VBOX_WITH_GUEST_CONTROL
+    if (u64Cmd & USAGE_GUESTCONTROL)
+        usageGuestControl();
+#endif /* VBOX_WITH_GUEST_CONTROL defined */
+
     if (u64Cmd & USAGE_METRICS)
     {
Index: /trunk/src/VBox/HostServices/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostServices/Makefile.kmk	(revision 27702)
+++ /trunk/src/VBox/HostServices/Makefile.kmk	(revision 27703)
@@ -40,4 +40,7 @@
  include $(PATH_SUB_CURRENT)/GuestProperties/Makefile.kmk
 endif
+ifdef VBOX_WITH_GUEST_CTRL
+ include $(PATH_SUB_CURRENT)/GuestControl/Makefile.kmk
+endif
 ifdef VBOX_WITH_GUEST_CONTROL
  include $(PATH_SUB_CURRENT)/GuestControl/Makefile.kmk
Index: /trunk/src/VBox/Main/GuestImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/GuestImpl.cpp	(revision 27702)
+++ /trunk/src/VBox/Main/GuestImpl.cpp	(revision 27703)
@@ -308,4 +308,17 @@
 }
 
+STDMETHODIMP Guest::ExecuteProgram(IN_BSTR aExecName, ULONG aFlags, 
+                                   ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment), 
+                                   IN_BSTR aStdIn, IN_BSTR aStdOut, IN_BSTR aStdErr,
+                                   IN_BSTR aUserName, IN_BSTR aPassword, 
+                                   ULONG aTimeoutMS, ULONG* aPID)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else  /* VBOX_WITH_GUEST_CONTROL */
+    return E_NOTIMPL;
+#endif
+}
+
 // public methods only for internal purposes
 /////////////////////////////////////////////////////////////////////////////
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 27702)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 27703)
@@ -8457,5 +8457,5 @@
   <interface
      name="IGuest" extends="$unknown"
-     uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
+     uuid="9576d333-deb9-4c65-0f06-6a1eb6a833e7"
      wsmap="managed"
      >
@@ -8570,4 +8570,48 @@
         <desc>Statistics value</desc>
       </param>
+    </method>
+
+    <method name="executeProgram">
+      <desc>
+        Executes an existing program inside the guest VM.
+
+        <result name="E_NOTIMPL">
+          Not implemented yet.
+        </result>
+
+      </desc>
+      <param name="execName" type="wstring" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="flags" type="unsigned long" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="arguments" type="wstring" safearray="yes" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="environment" type="wstring" safearray="yes" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="stdIn" type="wstring" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="stdOut" type="wstring" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="stdErr" type="wstring" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="userName" type="wstring" dir="in">
+        <desc>Foobar</desc> 
+      </param>
+      <param name="password" type="wstring" dir="in">
+        <desc>Foobar</desc> 
+      </param>  
+      <param name="timeoutMS" type="unsigned long" dir="in">
+        <desc>Foobar</desc> 
+      </param>  
+      <param name="pid" type="unsigned long" dir="out">
+        <desc>Foobar</desc> 
+      </param>  
     </method>
 
Index: /trunk/src/VBox/Main/include/GuestImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestImpl.h	(revision 27702)
+++ /trunk/src/VBox/Main/include/GuestImpl.h	(revision 27703)
@@ -72,4 +72,9 @@
                               IN_BSTR aDomain, BOOL aAllowInteractiveLogon);
     STDMETHOD(GetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG *aStatVal);
+    STDMETHOD(ExecuteProgram)(IN_BSTR aExecName, ULONG aFlags, 
+                              ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment),  
+                              IN_BSTR aStdIn, IN_BSTR aStdOut, IN_BSTR aStdErr,
+                              IN_BSTR aUserName, IN_BSTR aPassword, 
+                              ULONG aTimeoutMS, ULONG* aPID);
 
     // public methods that are not in IDL
