Index: /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 29554)
+++ /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 29555)
@@ -43,5 +43,6 @@
  	$(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL) \
  	$(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) \
- 	$(if $(VBOX_WITH_VDE), VBOX_WITH_VDE)
+ 	$(if $(VBOX_WITH_VDE), VBOX_WITH_VDE) \
+	$(if $(VBOX_WITH_HGCM), VBOX_WITH_HGCM)
  VBoxManage_DEFS.win   = _WIN32_WINNT=0x0500
  ifdef VBOX_DYNAMIC_NET_ATTACH
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 29554)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 29555)
@@ -30,4 +30,6 @@
 #include <VBox/com/VirtualBox.h>
 #include <VBox/com/EventQueue.h>
+
+#include <VBox/HostServices/GuestControlSvc.h> /* for PROC_STS_XXX */
 
 #include <VBox/log.h>
@@ -85,4 +87,29 @@
 }
 
+static const char *getStatus(ULONG uStatus)
+{
+    switch (uStatus)
+    {
+        case guestControl::PROC_STS_STARTED:
+            return "started";
+        case guestControl::PROC_STS_TEN:
+            return "successfully terminated";
+        case guestControl::PROC_STS_TES:
+            return "terminated by signal";
+        case guestControl::PROC_STS_TEA:
+            return "abnormally aborted";
+        case guestControl::PROC_STS_TOK:
+            return "timed out";
+        case guestControl::PROC_STS_TOA:
+            return "timed out, hanging";
+        case guestControl::PROC_STS_DWN:
+            return "killed";
+        case guestControl::PROC_STS_ERROR:
+            return "error";
+        default:
+            return "unknown";
+    }
+}
+
 static int handleExecProgram(HandlerArg *a)
 {
@@ -101,9 +128,9 @@
     Utf8Str Utf8Password;
     uint32_t u32TimeoutMS = 0;
-    bool waitForExit = false;
-    bool waitForStdOut = false;
-    bool waitForStdErr = false;
-    bool verbose = false;
-    bool have_timeout = false;
+    bool fWaitForExit = false;
+    bool fWaitForStdOut = false;
+    bool fWaitForStdErr = false;
+    bool fVerbose = false;
+    bool fTimeout = false;
 
     /* Always use the actual command line as argv[0]. */
@@ -197,5 +224,5 @@
             else
             {
-                have_timeout = true;
+                fTimeout = true;
                 ++i;
             }
@@ -208,14 +235,14 @@
             {
                 if (!strcmp(a->argv[i + 1], "exit"))
-                    waitForExit = true;
+                    fWaitForExit = true;
                 else if (!strcmp(a->argv[i + 1], "stdout"))
                 {
-                    waitForExit = true;
-                    waitForStdOut = true;
+                    fWaitForExit = true;
+                    fWaitForStdOut = true;
                 }
                 else if (!strcmp(a->argv[i + 1], "stderr"))
                 {
-                    waitForExit = true;
-                    waitForStdErr = true;
+                    fWaitForExit = true;
+                    fWaitForStdErr = true;
                 }
                 else
@@ -226,5 +253,5 @@
         else if (!strcmp(a->argv[i], "--verbose"))
         {
-            verbose = true;
+            fVerbose = true;
         }
         /** @todo Add fancy piping stuff here. */
@@ -276,5 +303,5 @@
             ULONG uPID = 0;
 
-            if (verbose)
+            if (fVerbose)
             {
                 if (u32TimeoutMS == 0)
@@ -292,8 +319,8 @@
                                                     Bstr(Utf8UserName), Bstr(Utf8Password), u32TimeoutMS,
                                                     &uPID, progress.asOutParam()));
-            if (verbose) RTPrintf("Process '%s' (PID: %u) started\n", Utf8Cmd.raw(), uPID);
-            if (waitForExit)
-            {
-                if (have_timeout)
+            if (fVerbose) RTPrintf("Process '%s' (PID: %u) started\n", Utf8Cmd.raw(), uPID);
+            if (fWaitForExit)
+            {
+                if (fTimeout)
                 {
                     /* Calculate timeout value left after process has been started.  */
@@ -303,14 +330,14 @@
                     {
                         u32TimeoutMS = u32TimeoutMS - u64Diff;
-                        if (verbose)
+                        if (fVerbose)
                             RTPrintf("Waiting for process to exit (%ums left) ...\n", u32TimeoutMS);
                     }
                     else
                     {
-                        if (verbose)
+                        if (fVerbose)
                             RTPrintf("No time left to wait for process!\n");
                     }
                 }
-                else if (verbose)
+                else if (fVerbose)
                     RTPrintf("Waiting for process to exit ...\n");
 
@@ -341,6 +368,6 @@
                      */
 
-                    if (   waitForStdOut
-                        || waitForStdErr)
+                    if (   fWaitForStdOut
+                        || fWaitForStdErr)
                     {
                         CHECK_ERROR_BREAK(guest, GetProcessOutput(uPID, 0 /* aFlags */,
@@ -375,5 +402,5 @@
                             break;
 
-                        if (   have_timeout
+                        if (   fTimeout
                             && RTTimeMilliTS() - u64StartMS > u32TimeoutMS + 5000)
                         {
@@ -426,9 +453,9 @@
                             RTPrintf("\n");
                         }
-                        if (verbose)
+                        if (fVerbose)
                         {
                             ULONG uRetStatus, uRetExitCode, uRetFlags;
                             CHECK_ERROR_BREAK(guest, GetProcessStatus(uPID, &uRetExitCode, &uRetFlags, &uRetStatus));
-                            RTPrintf("Exit code=%u (Status=%u, Flags=%u)\n", uRetExitCode, uRetStatus, uRetFlags);
+                            RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, uRetStatus, getStatus(uRetStatus), uRetFlags);
                         }
                     }
