Index: trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp	(revision 77595)
@@ -135,6 +135,9 @@
  * Print the usage info.
  */
-void printUsageInternal(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
-{
+void printUsageInternal(USAGECATEGORY enmCommand, PRTSTREAM pStrm)
+{
+    Assert(enmCommand != USAGE_INVALID);
+    Assert(enmCommand != USAGE_S_NEWCMD);
+    Assert(enmCommand != USAGE_S_DUMPOPTS);
     RTStrmPrintf(pStrm,
         "Usage: VBoxManage internalcommands <command> [command arguments]\n"
@@ -147,5 +150,5 @@
         "         incompatible ways without warning.\n",
 
-        (u64Cmd & USAGE_LOADMAP)
+        (enmCommand == USAGE_I_LOADMAP || enmCommand == USAGE_S_ALL)
         ? "  loadmap <vmname|uuid> <symfile> <address> [module] [subtrahend] [segment]\n"
           "      This will instruct DBGF to load the given map file\n"
@@ -153,5 +156,5 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_LOADSYMS)
+        (enmCommand == USAGE_I_LOADSYMS || enmCommand == USAGE_S_ALL)
         ? "  loadsyms <vmname|uuid> <symfile> [delta] [module] [module address]\n"
           "      This will instruct DBGF to load the given symbol file\n"
@@ -159,5 +162,5 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_SETHDUUID)
+        (enmCommand == USAGE_I_SETHDUUID || enmCommand == USAGE_S_ALL)
         ? "  sethduuid <filepath> [<uuid>]\n"
           "       Assigns a new UUID to the given image file. This way, multiple copies\n"
@@ -165,20 +168,20 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_SETHDPARENTUUID)
+        (enmCommand == USAGE_I_SETHDPARENTUUID || enmCommand == USAGE_S_ALL)
         ? "  sethdparentuuid <filepath> <uuid>\n"
           "       Assigns a new parent UUID to the given image file.\n"
           "\n"
         : "",
-        (u64Cmd & USAGE_DUMPHDINFO)
+        (enmCommand == USAGE_I_DUMPHDINFO || enmCommand == USAGE_S_ALL)
         ?  "  dumphdinfo <filepath>\n"
            "       Prints information about the image at the given location.\n"
            "\n"
         : "",
-        (u64Cmd & USAGE_LISTPARTITIONS)
+        (enmCommand == USAGE_I_LISTPARTITIONS || enmCommand == USAGE_S_ALL)
         ? "  listpartitions -rawdisk <diskname>\n"
           "       Lists all partitions on <diskname>.\n"
           "\n"
         : "",
-        (u64Cmd & USAGE_CREATERAWVMDK)
+        (enmCommand == USAGE_I_CREATERAWVMDK || enmCommand == USAGE_S_ALL)
         ? "  createrawvmdk -filename <filename> -rawdisk <diskname>\n"
           "                [-partitions <list of partition numbers> [-mbr <filename>] ]\n"
@@ -198,10 +201,10 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_RENAMEVMDK)
+        (enmCommand == USAGE_I_RENAMEVMDK || enmCommand == USAGE_S_ALL)
         ? "  renamevmdk -from <filename> -to <filename>\n"
           "       Renames an existing VMDK image, including the base file and all its extents.\n"
           "\n"
         : "",
-        (u64Cmd & USAGE_CONVERTTORAW)
+        (enmCommand == USAGE_I_CONVERTTORAW || enmCommand == USAGE_S_ALL)
         ? "  converttoraw [-format <fileformat>] <filename> <outputfile>"
 #ifdef ENABLE_CONVERT_RAW_TO_STDOUT
@@ -216,5 +219,5 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_CONVERTHD)
+        (enmCommand == USAGE_I_CONVERTHD || enmCommand == USAGE_S_ALL)
         ? "  converthd [-srcformat VDI|VMDK|VHD|RAW]\n"
           "            [-dstformat VDI|VMDK|VHD|RAW]\n"
@@ -223,5 +226,5 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_REPAIRHD)
+        (enmCommand == USAGE_I_REPAIRHD || enmCommand == USAGE_S_ALL)
         ? "  repairhd [-dry-run]\n"
           "           [-format VDI|VMDK|VHD|...]\n"
@@ -231,10 +234,10 @@
         : "",
 #ifdef RT_OS_WINDOWS
-        (u64Cmd & USAGE_MODINSTALL)
+        (enmCommand == USAGE_I_MODINSTALL || enmCommand == USAGE_S_ALL)
         ? "  modinstall\n"
           "       Installs the necessary driver for the host OS\n"
           "\n"
         : "",
-        (u64Cmd & USAGE_MODUNINSTALL)
+        (enmCommand == USAGE_I_MODUNINSTALL || enmCommand == USAGE_S_ALL)
         ? "  moduninstall\n"
           "       Deinstalls the driver\n"
@@ -245,5 +248,5 @@
         "",
 #endif
-        (u64Cmd & USAGE_DEBUGLOG)
+        (enmCommand == USAGE_I_DEBUGLOG || enmCommand == USAGE_S_ALL)
         ? "  debuglog <vmname|uuid> [--enable|--disable] [--flags todo]\n"
           "           [--groups todo] [--destinations todo]\n"
@@ -251,10 +254,10 @@
           "\n"
         : "",
-        (u64Cmd & USAGE_PASSWORDHASH)
-        ? "  passwordhash <passsword>\n"
+        (enmCommand == USAGE_I_PASSWORDHASH || enmCommand == USAGE_S_ALL)
+        ? "  passwordhash <password>\n"
           "       Generates a password hash.\n"
           "\n"
         : "",
-        (u64Cmd & USAGE_GUESTSTATS)
+        (enmCommand == USAGE_I_GUESTSTATS || enmCommand == USAGE_S_ALL)
         ? "  gueststats <vmname|uuid> [--interval <seconds>]\n"
           "       Obtains and prints internal guest statistics.\n"
@@ -627,10 +630,10 @@
         uuidType = HDUUID;
         if (argc != 3 && argc != 2)
-            return errorSyntax(USAGE_SETHDUUID, "Not enough parameters");
+            return errorSyntax(USAGE_I_SETHDUUID, "Not enough parameters");
         /* if specified, take UUID, otherwise generate a new one */
         if (argc == 3)
         {
             if (RT_FAILURE(RTUuidFromStr(&rtuuid, argv[2])))
-                return errorSyntax(USAGE_SETHDUUID, "Invalid UUID parameter");
+                return errorSyntax(USAGE_I_SETHDUUID, "Invalid UUID parameter");
             uuid = argv[2];
         } else
@@ -641,11 +644,11 @@
         uuidType = HDPARENTUUID;
         if (argc != 3)
-            return errorSyntax(USAGE_SETHDPARENTUUID, "Not enough parameters");
+            return errorSyntax(USAGE_I_SETHDPARENTUUID, "Not enough parameters");
         if (RT_FAILURE(RTUuidFromStr(&rtuuid, argv[2])))
-            return errorSyntax(USAGE_SETHDPARENTUUID, "Invalid UUID parameter");
+            return errorSyntax(USAGE_I_SETHDPARENTUUID, "Invalid UUID parameter");
         uuid = argv[2];
     }
     else
-        return errorSyntax(USAGE_SETHDUUID, "Invalid invocation");
+        return errorSyntax(USAGE_I_SETHDUUID, "Invalid invocation");
 
     /* just try it */
@@ -699,5 +702,5 @@
     if (argc != 1)
     {
-        return errorSyntax(USAGE_DUMPHDINFO, "Not enough parameters");
+        return errorSyntax(USAGE_I_DUMPHDINFO, "Not enough parameters");
     }
 
@@ -1093,10 +1096,10 @@
         else
         {
-            return errorSyntax(USAGE_LISTPARTITIONS, "Invalid parameter '%s'", argv[i]);
+            return errorSyntax(USAGE_I_LISTPARTITIONS, "Invalid parameter '%s'", argv[i]);
         }
     }
 
     if (rawdisk.isEmpty())
-        return errorSyntax(USAGE_LISTPARTITIONS, "Mandatory parameter -rawdisk missing");
+        return errorSyntax(USAGE_I_LISTPARTITIONS, "Mandatory parameter -rawdisk missing");
 
     RTFILE hRawFile;
@@ -1210,13 +1213,13 @@
 #endif /* RT_OS_LINUX || RT_OS_FREEBSD */
         else
-            return errorSyntax(USAGE_CREATERAWVMDK, "Invalid parameter '%s'", argv[i]);
+            return errorSyntax(USAGE_I_CREATERAWVMDK, "Invalid parameter '%s'", argv[i]);
     }
 
     if (filename.isEmpty())
-        return errorSyntax(USAGE_CREATERAWVMDK, "Mandatory parameter -filename missing");
+        return errorSyntax(USAGE_I_CREATERAWVMDK, "Mandatory parameter -filename missing");
     if (rawdisk.isEmpty())
-        return errorSyntax(USAGE_CREATERAWVMDK, "Mandatory parameter -rawdisk missing");
+        return errorSyntax(USAGE_I_CREATERAWVMDK, "Mandatory parameter -rawdisk missing");
     if (!pszPartitions && pszMBRFilename)
-        return errorSyntax(USAGE_CREATERAWVMDK, "The parameter -mbr is only valid when the parameter -partitions is also present");
+        return errorSyntax(USAGE_I_CREATERAWVMDK, "The parameter -mbr is only valid when the parameter -partitions is also present");
 
 #ifdef RT_OS_DARWIN
@@ -1897,12 +1900,12 @@
         else
         {
-            return errorSyntax(USAGE_RENAMEVMDK, "Invalid parameter '%s'", argv[i]);
+            return errorSyntax(USAGE_I_RENAMEVMDK, "Invalid parameter '%s'", argv[i]);
         }
     }
 
     if (src.isEmpty())
-        return errorSyntax(USAGE_RENAMEVMDK, "Mandatory parameter -from missing");
+        return errorSyntax(USAGE_I_RENAMEVMDK, "Mandatory parameter -from missing");
     if (dst.isEmpty())
-        return errorSyntax(USAGE_RENAMEVMDK, "Mandatory parameter -to missing");
+        return errorSyntax(USAGE_I_RENAMEVMDK, "Mandatory parameter -to missing");
 
     PVDISK pDisk = NULL;
@@ -1970,12 +1973,12 @@
         else
         {
-            return errorSyntax(USAGE_CONVERTTORAW, "Invalid parameter '%s'", argv[i]);
+            return errorSyntax(USAGE_I_CONVERTTORAW, "Invalid parameter '%s'", argv[i]);
         }
     }
 
     if (src.isEmpty())
-        return errorSyntax(USAGE_CONVERTTORAW, "Mandatory filename parameter missing");
+        return errorSyntax(USAGE_I_CONVERTTORAW, "Mandatory filename parameter missing");
     if (dst.isEmpty())
-        return errorSyntax(USAGE_CONVERTTORAW, "Mandatory outputfile parameter missing");
+        return errorSyntax(USAGE_I_CONVERTTORAW, "Mandatory outputfile parameter missing");
 
     PVDISK pDisk = NULL;
@@ -2135,12 +2138,12 @@
         else
         {
-            return errorSyntax(USAGE_CONVERTHD, "Invalid parameter '%s'", argv[i]);
+            return errorSyntax(USAGE_I_CONVERTHD, "Invalid parameter '%s'", argv[i]);
         }
     }
 
     if (src.isEmpty())
-        return errorSyntax(USAGE_CONVERTHD, "Mandatory input image parameter missing");
+        return errorSyntax(USAGE_I_CONVERTHD, "Mandatory input image parameter missing");
     if (dst.isEmpty())
-        return errorSyntax(USAGE_CONVERTHD, "Mandatory output image parameter missing");
+        return errorSyntax(USAGE_I_CONVERTHD, "Mandatory output image parameter missing");
 
 
@@ -2254,10 +2257,10 @@
         else
         {
-            return errorSyntax(USAGE_REPAIRHD, "Invalid parameter '%s'", argv[i]);
+            return errorSyntax(USAGE_I_REPAIRHD, "Invalid parameter '%s'", argv[i]);
         }
     }
 
     if (image.isEmpty())
-        return errorSyntax(USAGE_REPAIRHD, "Mandatory input image parameter missing");
+        return errorSyntax(USAGE_I_REPAIRHD, "Mandatory input image parameter missing");
 
     PVDINTERFACE     pVDIfs = NULL;
@@ -2333,5 +2336,5 @@
      */
     if (argc < 1)
-        return errorSyntax(USAGE_DEBUGLOG, "Missing VM name/UUID");
+        return errorSyntax(USAGE_I_DEBUGLOG, "Missing VM name/UUID");
 
     ComPtr<IMachine> ptrMachine;
@@ -2421,5 +2424,5 @@
 
             default:
-                return errorGetOpt(USAGE_DEBUGLOG, ch, &ValueUnion);
+                return errorGetOpt(USAGE_I_DEBUGLOG, ch, &ValueUnion);
         }
     }
@@ -2449,5 +2452,5 @@
     /* one parameter, the password to hash */
     if (argc != 1)
-        return errorSyntax(USAGE_PASSWORDHASH, "password to hash required");
+        return errorSyntax(USAGE_I_PASSWORDHASH, "password to hash required");
 
     uint8_t abDigest[RTSHA256_HASH_SIZE];
@@ -2468,5 +2471,5 @@
     /* one parameter, guest name */
     if (argc < 1)
-        return errorSyntax(USAGE_GUESTSTATS, "Missing VM name/UUID");
+        return errorSyntax(USAGE_I_GUESTSTATS, "Missing VM name/UUID");
 
     /*
@@ -2493,10 +2496,10 @@
 
             default:
-                return errorGetOpt(USAGE_GUESTSTATS, ch, &ValueUnion);
+                return errorGetOpt(USAGE_I_GUESTSTATS, ch, &ValueUnion);
         }
     }
 
     if (argc > 1 && aUpdateInterval == 0)
-        return errorSyntax(USAGE_GUESTSTATS, "Invalid update interval specified");
+        return errorSyntax(USAGE_I_GUESTSTATS, "Invalid update interval specified");
 
     RTPrintf("argc=%d interval=%u\n", argc, aUpdateInterval);
@@ -2553,5 +2556,5 @@
     /* at least a command is required */
     if (a->argc < 1)
-        return errorSyntax(USAGE_ALL, "Command missing");
+        return errorSyntax(USAGE_S_ALL, "Command missing");
 
     /*
@@ -2593,5 +2596,5 @@
 
     /* default: */
-    return errorSyntax(USAGE_ALL, "Invalid command '%s'", a->argv[0]);
+    return errorSyntax(USAGE_S_ALL, "Invalid command '%s'", a->argv[0]);
 }
 
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 77595)
@@ -98,5 +98,5 @@
 static const VBMGCMD g_aCommands[] =
 {
-    { "internalcommands",   0,                      VBMG_CMD_TODO, handleInternalCommands,     0 },
+    { "internalcommands",   USAGE_INVALID,          VBMG_CMD_TODO, handleInternalCommands,     0 },
     { "list",               USAGE_LIST,             VBMG_CMD_TODO, handleList,                 0 },
     { "showvminfo",         USAGE_SHOWVMINFO,       VBMG_CMD_TODO, handleShowVMInfo,           0 },
@@ -122,5 +122,5 @@
     { "startvm",            USAGE_STARTVM,          VBMG_CMD_TODO, handleStartVM,              0 },
     { "controlvm",          USAGE_CONTROLVM,        VBMG_CMD_TODO, handleControlVM,            0 },
-    { "unattended",         USAGE_UNATTENDED, HELP_CMD_UNATTENDED, handleUnattended,    0 },
+    { "unattended",         USAGE_S_NEWCMD,   HELP_CMD_UNATTENDED, handleUnattended,           0 },
     { "discardstate",       USAGE_DISCARDSTATE,     VBMG_CMD_TODO, handleDiscardState,         0 },
     { "adoptstate",         USAGE_ADOPTSTATE,       VBMG_CMD_TODO, handleAdoptState,           0 },
@@ -132,5 +132,5 @@
     { "showhdinfo",         USAGE_SHOWMEDIUMINFO,   VBMG_CMD_TODO, handleShowMediumInfo,       0 }, /* backward compatibility */
     { "showvdiinfo",        USAGE_SHOWMEDIUMINFO,   VBMG_CMD_TODO, handleShowMediumInfo,       0 }, /* backward compatibility */
-    { "mediumio",           USAGE_MEDIUMIO,     HELP_CMD_MEDIUMIO, handleMediumIO,             0 },
+    { "mediumio",           USAGE_S_NEWCMD,     HELP_CMD_MEDIUMIO, handleMediumIO,             0 },
     { "getextradata",       USAGE_GETEXTRADATA,     VBMG_CMD_TODO, handleGetExtraData,         0 },
     { "setextradata",       USAGE_SETEXTRADATA,     VBMG_CMD_TODO, handleSetExtraData,         0 },
@@ -154,7 +154,7 @@
     { "natnetwork",         USAGE_NATNETWORK,       VBMG_CMD_TODO, handleNATNetwork,           0 },
 #endif
-    { "extpack",            USAGE_EXTPACK,       HELP_CMD_EXTPACK, handleExtPack,              0 },
+    { "extpack",            USAGE_S_NEWCMD,      HELP_CMD_EXTPACK, handleExtPack,              0 },
     { "bandwidthctl",       USAGE_BANDWIDTHCONTROL, VBMG_CMD_TODO, handleBandwidthControl,     0 },
-    { "debugvm",            USAGE_DEBUGVM,       HELP_CMD_DEBUGVM, handleDebugVM,              0 },
+    { "debugvm",            USAGE_S_NEWCMD,      HELP_CMD_DEBUGVM, handleDebugVM,              0 },
     { "convertfromraw",     USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
     { "convertdd",          USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
@@ -497,5 +497,5 @@
             {
                 showLogo(g_pStdOut);
-                printUsage(USAGE_ALL, ~0U, g_pStdOut);
+                printUsage(USAGE_S_ALL, RTMSGREFENTRYSTR_SCOPE_GLOBAL, g_pStdOut);
                 return 0;
             }
@@ -524,5 +524,5 @@
             /* Special option to dump really all commands,
              * even the ones not understood on this platform. */
-            printUsage(USAGE_DUMPOPTS, ~0U, g_pStdOut);
+            printUsage(USAGE_S_DUMPOPTS, RTMSGREFENTRYSTR_SCOPE_GLOBAL, g_pStdOut);
             return 0;
         }
@@ -619,8 +619,8 @@
         && (   fShowHelp
             || (   argc - iCmdArg == 0
-                && pCmd->enmHelpCat != 0)))
+                && pCmd->enmHelpCat != USAGE_INVALID)))
     {
         if (pCmd->enmCmdHelp == VBMG_CMD_TODO)
-            printUsage(pCmd->enmHelpCat, ~0U, g_pStdOut);
+            printUsage(pCmd->enmHelpCat, RTMSGREFENTRYSTR_SCOPE_GLOBAL, g_pStdOut);
         else if (fShowHelp)
             printHelp(g_pStdOut);
@@ -636,9 +636,11 @@
             for (unsigned i = 0; i < RT_ELEMENTS(g_aCommands); i++)
                 if (   i == 0  /* skip backwards compatibility entries */
-                    || g_aCommands[i].enmHelpCat != g_aCommands[i - 1].enmHelpCat)
+                    || (g_aCommands[i].enmHelpCat != USAGE_S_NEWCMD
+                        ? g_aCommands[i].enmHelpCat != g_aCommands[i - 1].enmHelpCat
+                        : g_aCommands[i].enmCmdHelp != g_aCommands[i - 1].enmCmdHelp))
                     RTPrintf("    %s\n", g_aCommands[i].pszCommand);
             return RTEXITCODE_SUCCESS;
         }
-        return errorSyntax(USAGE_ALL, "Invalid command '%s'", argv[iCmd]);
+        return errorSyntax(USAGE_S_ALL, "Invalid command '%s'", argv[iCmd]);
     }
 
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 77595)
@@ -46,100 +46,105 @@
 ////////////////////////////////////////////////////////////////////////////////
 
-/** @name Syntax diagram category.
+/** @name Syntax diagram category, i.e. the command.
  * @{ */
-#define USAGE_DUMPOPTS              0
-#define USAGE_LIST                  RT_BIT_64(0)
-#define USAGE_SHOWVMINFO            RT_BIT_64(1)
-#define USAGE_REGISTERVM            RT_BIT_64(2)
-#define USAGE_UNREGISTERVM          RT_BIT_64(3)
-#define USAGE_CREATEVM              RT_BIT_64(4)
-#define USAGE_MODIFYVM              RT_BIT_64(5)
-#define USAGE_CLONEVM               RT_BIT_64(6)
-#define USAGE_STARTVM               RT_BIT_64(7)
-#define USAGE_CONTROLVM             RT_BIT_64(8)
-#define USAGE_DISCARDSTATE          RT_BIT_64(9)
-#define USAGE_SNAPSHOT              RT_BIT_64(10)
-#define USAGE_CLOSEMEDIUM           RT_BIT_64(11)
-#define USAGE_SHOWMEDIUMINFO        RT_BIT_64(12)
-#define USAGE_CREATEMEDIUM          RT_BIT_64(13)
-#define USAGE_MODIFYMEDIUM          RT_BIT_64(14)
-#define USAGE_CLONEMEDIUM           RT_BIT_64(15)
-#define USAGE_MOVEVM                RT_BIT_64(16)
-#define USAGE_CREATEHOSTIF          RT_BIT_64(17)
-#define USAGE_REMOVEHOSTIF          RT_BIT_64(18)
-#define USAGE_GETEXTRADATA          RT_BIT_64(19)
-#define USAGE_SETEXTRADATA          RT_BIT_64(20)
-#define USAGE_SETPROPERTY           RT_BIT_64(21)
-#define USAGE_USBFILTER             (RT_BIT_64(22) | RT_BIT_64(23) | RT_BIT_64(24))
-#define USAGE_USBFILTER_ADD         RT_BIT_64(22)
-#define USAGE_USBFILTER_MODIFY      RT_BIT_64(23)
-#define USAGE_USBFILTER_REMOVE      RT_BIT_64(24)
-#define USAGE_SHAREDFOLDER          (RT_BIT_64(25) | RT_BIT_64(26))
-#define USAGE_SHAREDFOLDER_ADD      RT_BIT_64(25)
-#define USAGE_SHAREDFOLDER_REMOVE   RT_BIT_64(26)
-#define USAGE_UNATTENDED            RT_BIT_64(27)
-#define USAGE_MEDIUMIO              RT_BIT_64(28)
-#define USAGE_LOADSYMS              RT_BIT_64(29)
-#define USAGE_LOADMAP               RT_BIT_64(30)
-#define USAGE_SETHDUUID             RT_BIT_64(31)
-#define USAGE_CONVERTFROMRAW        RT_BIT_64(32)
-#define USAGE_LISTPARTITIONS        RT_BIT_64(33)
-#define USAGE_CREATERAWVMDK         RT_BIT_64(34)
-#define USAGE_DEBUGVM               RT_BIT_64(35)
-#define USAGE_ADOPTSTATE            RT_BIT_64(36)
-#define USAGE_MODINSTALL            RT_BIT_64(37)
-#define USAGE_MODUNINSTALL          RT_BIT_64(38)
-#define USAGE_RENAMEVMDK            RT_BIT_64(39)
+typedef enum
+{
+    USAGE_INVALID = 0,
+    USAGE_LIST,
+    USAGE_SHOWVMINFO,
+    USAGE_REGISTERVM,
+    USAGE_UNREGISTERVM,
+    USAGE_CREATEVM,
+    USAGE_MODIFYVM,
+    USAGE_CLONEVM,
+    USAGE_STARTVM,
+    USAGE_CONTROLVM,
+    USAGE_DISCARDSTATE,
+    USAGE_SNAPSHOT,
+    USAGE_CLOSEMEDIUM,
+    USAGE_SHOWMEDIUMINFO,
+    USAGE_CREATEMEDIUM,
+    USAGE_MODIFYMEDIUM,
+    USAGE_CLONEMEDIUM,
+    USAGE_MOVEVM,
+    USAGE_CREATEHOSTIF,
+    USAGE_REMOVEHOSTIF,
+    USAGE_GETEXTRADATA,
+    USAGE_SETEXTRADATA,
+    USAGE_SETPROPERTY,
+    USAGE_USBFILTER,
+    USAGE_SHAREDFOLDER,
+    USAGE_I_LOADSYMS,
+    USAGE_I_LOADMAP,
+    USAGE_I_SETHDUUID,
+    USAGE_CONVERTFROMRAW,
+    USAGE_I_LISTPARTITIONS,
+    USAGE_I_CREATERAWVMDK,
+    USAGE_ADOPTSTATE,
+    USAGE_I_MODINSTALL,
+    USAGE_I_MODUNINSTALL,
+    USAGE_I_RENAMEVMDK,
 #ifdef VBOX_WITH_GUEST_PROPS
-# define USAGE_GUESTPROPERTY        RT_BIT_64(40)
+    USAGE_GUESTPROPERTY,
 #endif  /* VBOX_WITH_GUEST_PROPS defined */
-#define USAGE_CONVERTTORAW          RT_BIT_64(41)
-#define USAGE_METRICS               RT_BIT_64(42)
-#define USAGE_CONVERTHD             RT_BIT_64(43)
-#define USAGE_IMPORTAPPLIANCE       RT_BIT_64(44)
-#define USAGE_EXPORTAPPLIANCE       RT_BIT_64(45)
-#define USAGE_HOSTONLYIFS           RT_BIT_64(46)
-#define USAGE_DHCPSERVER            RT_BIT_64(47)
-#define USAGE_DUMPHDINFO            RT_BIT_64(48)
-#define USAGE_STORAGEATTACH         RT_BIT_64(49)
-#define USAGE_STORAGECONTROLLER     RT_BIT_64(50)
+    USAGE_I_CONVERTTORAW,
+    USAGE_METRICS,
+    USAGE_I_CONVERTHD,
+    USAGE_IMPORTAPPLIANCE,
+    USAGE_EXPORTAPPLIANCE,
+    USAGE_HOSTONLYIFS,
+    USAGE_DHCPSERVER,
+    USAGE_I_DUMPHDINFO,
+    USAGE_STORAGEATTACH,
+    USAGE_STORAGECONTROLLER,
 #ifdef VBOX_WITH_GUEST_CONTROL
-# define USAGE_GUESTCONTROL         RT_BIT_64(51)
+    USAGE_GUESTCONTROL,
 #endif  /* VBOX_WITH_GUEST_CONTROL defined */
-#define USAGE_DEBUGLOG              RT_BIT_64(52)
-#define USAGE_SETHDPARENTUUID       RT_BIT_64(53)
-#define USAGE_PASSWORDHASH          RT_BIT_64(54)
-#define USAGE_EXTPACK               RT_BIT_64(55)
-#define USAGE_BANDWIDTHCONTROL      RT_BIT_64(56)
-#define USAGE_GUESTSTATS            RT_BIT_64(57)
-#define USAGE_REPAIRHD              RT_BIT_64(58)
-#define USAGE_NATNETWORK            RT_BIT_64(59)
-#define USAGE_MEDIUMPROPERTY        RT_BIT_64(60)
-#define USAGE_ENCRYPTMEDIUM         RT_BIT_64(61)
-#define USAGE_MEDIUMENCCHKPWD       RT_BIT_64(62)
-#define USAGE_USBDEVSOURCE          RT_BIT_64(63)
-#define USAGE_ALL                   (~(uint64_t)0)
+    USAGE_I_DEBUGLOG,
+    USAGE_I_SETHDPARENTUUID,
+    USAGE_I_PASSWORDHASH,
+    USAGE_BANDWIDTHCONTROL,
+    USAGE_I_GUESTSTATS,
+    USAGE_I_REPAIRHD,
+    USAGE_NATNETWORK,
+    USAGE_MEDIUMPROPERTY,
+    USAGE_ENCRYPTMEDIUM,
+    USAGE_MEDIUMENCCHKPWD,
+    USAGE_USBDEVSOURCE,
+    /* Insert new entries before this line, but only if it is not an option
+     * to go for the new style command and help handling (see e.g. extpack,
+     * unattend or mediumio. */
+    USAGE_S_NEWCMD = 10000, /**< new style command with no old help support */
+    USAGE_S_ALL,
+    USAGE_S_DUMPOPTS
+} USAGECATEGORY;
 /** @} */
 
+
+#define HELP_SCOPE_USBFILTER_ADD        RT_BIT_64(0)
+#define HELP_SCOPE_USBFILTER_MODIFY     RT_BIT_64(1)
+#define HELP_SCOPE_USBFILTER_REMOVE     RT_BIT_64(2)
+
+#define HELP_SCOPE_SHAREDFOLDER_ADD     RT_BIT_64(0)
+#define HELP_SCOPE_SHAREDFOLDER_REMOVE  RT_BIT_64(1)
+
 #ifdef VBOX_WITH_GUEST_CONTROL
-# define USAGE_GSTCTRL_RUN          RT_BIT(0)
-# define USAGE_GSTCTRL_START        RT_BIT(1)
-# define USAGE_GSTCTRL_COPYFROM     RT_BIT(2)
-# define USAGE_GSTCTRL_COPYTO       RT_BIT(3)
-# define USAGE_GSTCTRL_MKDIR        RT_BIT(4)
-# define USAGE_GSTCTRL_RMDIR        RT_BIT(5)
-# define USAGE_GSTCTRL_RM           RT_BIT(6)
-# define USAGE_GSTCTRL_MV           RT_BIT(7)
-# define USAGE_GSTCTRL_MKTEMP       RT_BIT(8)
-# define USAGE_GSTCTRL_LIST         RT_BIT(9)
-# define USAGE_GSTCTRL_CLOSEPROCESS RT_BIT(10)
-# define USAGE_GSTCTRL_CLOSESESSION RT_BIT(11)
-# define USAGE_GSTCTRL_STAT         RT_BIT(12)
-# define USAGE_GSTCTRL_UPDATEGA     RT_BIT(13)
-# define USAGE_GSTCTRL_WATCH        RT_BIT(14)
-#endif
-
-
-typedef uint64_t USAGECATEGORY;
+# define HELP_SCOPE_GSTCTRL_RUN             RT_BIT(0)
+# define HELP_SCOPE_GSTCTRL_START           RT_BIT(1)
+# define HELP_SCOPE_GSTCTRL_COPYFROM        RT_BIT(2)
+# define HELP_SCOPE_GSTCTRL_COPYTO          RT_BIT(3)
+# define HELP_SCOPE_GSTCTRL_MKDIR           RT_BIT(4)
+# define HELP_SCOPE_GSTCTRL_RMDIR           RT_BIT(5)
+# define HELP_SCOPE_GSTCTRL_RM              RT_BIT(6)
+# define HELP_SCOPE_GSTCTRL_MV              RT_BIT(7)
+# define HELP_SCOPE_GSTCTRL_MKTEMP          RT_BIT(8)
+# define HELP_SCOPE_GSTCTRL_LIST            RT_BIT(9)
+# define HELP_SCOPE_GSTCTRL_CLOSEPROCESS    RT_BIT(10)
+# define HELP_SCOPE_GSTCTRL_CLOSESESSION    RT_BIT(11)
+# define HELP_SCOPE_GSTCTRL_STAT            RT_BIT(12)
+# define HELP_SCOPE_GSTCTRL_UPDATEGA        RT_BIT(13)
+# define HELP_SCOPE_GSTCTRL_WATCH           RT_BIT(14)
+#endif
+
 
 /** command handler argument */
@@ -185,12 +190,14 @@
 
 /* VBoxManageHelp.cpp */
-void printUsage(USAGECATEGORY fCategory, uint32_t fSubCategory, PRTSTREAM pStrm);
-RTEXITCODE errorSyntax(USAGECATEGORY fCategory, const char *pszFormat, ...);
-RTEXITCODE errorSyntaxEx(USAGECATEGORY fCategory, uint32_t fSubCategory, const char *pszFormat, ...);
-RTEXITCODE errorGetOpt(USAGECATEGORY fCategory, int rc, union RTGETOPTUNION const *pValueUnion);
-RTEXITCODE errorGetOptEx(USAGECATEGORY fCategory, uint32_t fSubCategory, int rc, union RTGETOPTUNION const *pValueUnion);
+
+/* Legacy help infrastructure, to be replaced by new one using generated help. */
+void printUsage(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, PRTSTREAM pStrm);
+RTEXITCODE errorSyntax(USAGECATEGORY enmCommand, const char *pszFormat, ...);
+RTEXITCODE errorSyntaxEx(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, const char *pszFormat, ...);
+RTEXITCODE errorGetOpt(USAGECATEGORY enmCommand, int rc, union RTGETOPTUNION const *pValueUnion);
+RTEXITCODE errorGetOptEx(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, int rc, union RTGETOPTUNION const *pValueUnion);
 RTEXITCODE errorArgument(const char *pszFormat, ...);
 
-void printUsageInternal(USAGECATEGORY fCategory, PRTSTREAM pStrm);
+void printUsageInternal(USAGECATEGORY enmCommand, PRTSTREAM pStrm);
 
 #ifndef VBOX_ONLY_DOCS
@@ -238,5 +245,5 @@
 
 /* VBoxManageGuestCtrl.cpp */
-extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint32_t fSubCategory);
+extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope);
 
 #ifndef VBOX_ONLY_DOCS
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp	(revision 77595)
@@ -261,5 +261,5 @@
                     else
                         fVmOptionRead = true;
-                    u8Slot = (uint8_t)~0; /* clear slor */
+                    u8Slot = (uint8_t)~0; /* clear slot */
                     pszVmName = RTStrDup(ValueUnion.psz);
                 }
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 77595)
@@ -130,6 +130,6 @@
     DECLR3CALLBACKMEMBER(RTEXITCODE, pfnHandler, (struct GCTLCMDCTX *pCtx, int argc, char **argv));
 
-    /** The command usage flags. */
-    uint32_t    fCmdUsage;
+    /** The sub-command scope flags. */
+    uint64_t    fSubcommandScope;
     /** Command context flags (GCTLCMDCTX_F_XXX). */
     uint32_t    fCmdCtx;
@@ -227,22 +227,22 @@
 
 
-void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint32_t uSubCmd)
-{
-    const uint32_t fAnonSubCmds = USAGE_GSTCTRL_CLOSESESSION
-                                | USAGE_GSTCTRL_LIST
-                                | USAGE_GSTCTRL_CLOSEPROCESS
-                                | USAGE_GSTCTRL_CLOSESESSION
-                                | USAGE_GSTCTRL_UPDATEGA
-                                | USAGE_GSTCTRL_WATCH;
+void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope)
+{
+    const uint64_t fAnonSubCmds = HELP_SCOPE_GSTCTRL_CLOSESESSION
+                                | HELP_SCOPE_GSTCTRL_LIST
+                                | HELP_SCOPE_GSTCTRL_CLOSEPROCESS
+                                | HELP_SCOPE_GSTCTRL_CLOSESESSION
+                                | HELP_SCOPE_GSTCTRL_UPDATEGA
+                                | HELP_SCOPE_GSTCTRL_WATCH;
 
     /*                0         1         2         3         4         5         6         7         8XXXXXXXXXX */
     /*                0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 */
-    if (~fAnonSubCmds & uSubCmd)
+    if (~fAnonSubCmds & fSubcommandScope)
         RTStrmPrintf(pStrm,
                      "%s guestcontrol %s    <uuid|vmname> [--verbose|-v] [--quiet|-q]\n"
                      "                              [--username <name>] [--domain <domain>]\n"
                      "                              [--passwordfile <file> | --password <password>]\n%s",
-                     pcszSep1, pcszSep2, uSubCmd == ~0U ? "\n" : "");
-    if (uSubCmd & USAGE_GSTCTRL_RUN)
+                     pcszSep1, pcszSep2, (fSubcommandScope & RTMSGREFENTRYSTR_SCOPE_MASK) == RTMSGREFENTRYSTR_SCOPE_GLOBAL ? "\n" : "");
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RUN)
         RTStrmPrintf(pStrm,
                      "                              run [common-options]\n"
@@ -255,5 +255,5 @@
                      "                              -- <program/arg0> [argument1] ... [argumentN]]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_START)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_START)
         RTStrmPrintf(pStrm,
                      "                              start [common-options]\n"
@@ -263,5 +263,5 @@
                      "                              -- <program/arg0> [argument1] ... [argumentN]]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_COPYFROM)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_COPYFROM)
         RTStrmPrintf(pStrm,
                      "                              copyfrom [common-options]\n"
@@ -274,5 +274,5 @@
                      "                              <guest-src0> [guest-src1 [...]]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_COPYTO)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_COPYTO)
         RTStrmPrintf(pStrm,
                      "                              copyto [common-options]\n"
@@ -285,5 +285,5 @@
                      "                              <host-src0> [host-src1 [...]]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_MKDIR)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MKDIR)
         RTStrmPrintf(pStrm,
                      "                              mkdir|createdir[ectory] [common-options]\n"
@@ -291,5 +291,5 @@
                      "                              <guest directory> [...]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_RMDIR)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RMDIR)
         RTStrmPrintf(pStrm,
                      "                              rmdir|removedir[ectory] [common-options]\n"
@@ -297,15 +297,15 @@
                      "                              <guest directory> [...]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_RM)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RM)
         RTStrmPrintf(pStrm,
                      "                              removefile|rm [common-options] [-f|--force]\n"
                      "                              <guest file> [...]\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_MV)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MV)
         RTStrmPrintf(pStrm,
                      "                              mv|move|ren[ame] [common-options]\n"
                      "                              <source> [source1 [...]] <dest>\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_MKTEMP)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MKTEMP)
         RTStrmPrintf(pStrm,
                      "                              mktemp|createtemp[orary] [common-options]\n"
@@ -313,5 +313,5 @@
                      "                              <template>\n"
                      "\n");
-    if (uSubCmd & USAGE_GSTCTRL_STAT)
+    if (fSubcommandScope & HELP_SCOPE_GSTCTRL_STAT)
         RTStrmPrintf(pStrm,
                      "                              stat [common-options]\n"
@@ -322,5 +322,5 @@
      * Command not requiring authentication.
      */
-    if (fAnonSubCmds & uSubCmd)
+    if (fAnonSubCmds & fSubcommandScope)
     {
         /*                0         1         2         3         4         5         6         7         8XXXXXXXXXX */
@@ -328,10 +328,10 @@
         RTStrmPrintf(pStrm,
                      "%s guestcontrol %s    <uuid|vmname> [--verbose|-v] [--quiet|-q]\n%s",
-                     pcszSep1, pcszSep2, uSubCmd == ~0U ? "\n" : "");
-        if (uSubCmd & USAGE_GSTCTRL_LIST)
+                     pcszSep1, pcszSep2, (fSubcommandScope & RTMSGREFENTRYSTR_SCOPE_MASK) == RTMSGREFENTRYSTR_SCOPE_GLOBAL ? "\n" : "");
+        if (fSubcommandScope & HELP_SCOPE_GSTCTRL_LIST)
             RTStrmPrintf(pStrm,
                      "                              list <all|sessions|processes|files> [common-opts]\n"
                      "\n");
-        if (uSubCmd & USAGE_GSTCTRL_CLOSEPROCESS)
+        if (fSubcommandScope & HELP_SCOPE_GSTCTRL_CLOSEPROCESS)
             RTStrmPrintf(pStrm,
                      "                              closeprocess [common-options]\n"
@@ -340,5 +340,5 @@
                      "                              <PID1> [PID1 [...]]\n"
                      "\n");
-        if (uSubCmd & USAGE_GSTCTRL_CLOSESESSION)
+        if (fSubcommandScope & HELP_SCOPE_GSTCTRL_CLOSESESSION)
             RTStrmPrintf(pStrm,
                      "                              closesession [common-options]\n"
@@ -346,5 +346,5 @@
                      "                                | --session-name <name or pattern> >\n"
                      "\n");
-        if (uSubCmd & USAGE_GSTCTRL_UPDATEGA)
+        if (fSubcommandScope & HELP_SCOPE_GSTCTRL_UPDATEGA)
             RTStrmPrintf(pStrm,
                      "                              updatega|updateguestadditions|updateadditions\n"
@@ -353,5 +353,5 @@
                      "                              [-- [<argument1>] ... [<argumentN>]]\n"
                      "\n");
-        if (uSubCmd & USAGE_GSTCTRL_WATCH)
+        if (fSubcommandScope & HELP_SCOPE_GSTCTRL_WATCH)
             RTStrmPrintf(pStrm,
                      "                              watch [common-options]\n"
@@ -966,5 +966,5 @@
     }
     else
-        rcExit = errorSyntaxEx(USAGE_GUESTCONTROL, pCtx->pCmdDef->fCmdUsage, "No user name specified!");
+        rcExit = errorSyntaxEx(USAGE_GUESTCONTROL, pCtx->pCmdDef->fSubcommandScope, "No user name specified!");
 
     pCtx->fPostOptionParsingInited = rcExit == RTEXITCODE_SUCCESS;
@@ -1320,5 +1320,5 @@
                     if (   ValueUnion.psz[0] == '\0'
                         || ValueUnion.psz[0] == '=')
-                        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RUN,
+                        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN,
                                              "Invalid argument variable[=value]: '%s'", ValueUnion.psz);
                     aEnv.push_back(Bstr(ValueUnion.psz).raw());
@@ -1390,5 +1390,5 @@
 
                 default:
-                    return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RUN, ch, &ValueUnion);
+                    return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN, ch, &ValueUnion);
 
             } /* switch */
@@ -1397,5 +1397,5 @@
         /* Must have something to execute. */
         if (!pszImage || !*pszImage)
-            return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RUN, "No executable specified!");
+            return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN, "No executable specified!");
 
         /*
@@ -1668,5 +1668,5 @@
 static DECLCALLBACK(RTEXITCODE) gctlHandleRun(PGCTLCMDCTX pCtx, int argc, char **argv)
 {
-    return gctlHandleRunCommon(pCtx, argc, argv, true /*fRunCmd*/, USAGE_GSTCTRL_RUN);
+    return gctlHandleRunCommon(pCtx, argc, argv, true /*fRunCmd*/, HELP_SCOPE_GSTCTRL_RUN);
 }
 
@@ -1674,5 +1674,5 @@
 static DECLCALLBACK(RTEXITCODE) gctlHandleStart(PGCTLCMDCTX pCtx, int argc, char **argv)
 {
-    return gctlHandleRunCommon(pCtx, argc, argv, false /*fRunCmd*/, USAGE_GSTCTRL_START);
+    return gctlHandleRunCommon(pCtx, argc, argv, false /*fRunCmd*/, HELP_SCOPE_GSTCTRL_START);
 }
 
@@ -1718,5 +1718,5 @@
     bool fFollow = false;
     bool fRecursive = false;
-    uint32_t uUsage = fHostToGuest ? USAGE_GSTCTRL_COPYTO : USAGE_GSTCTRL_COPYFROM;
+    uint64_t uUsage = fHostToGuest ? HELP_SCOPE_GSTCTRL_COPYTO : HELP_SCOPE_GSTCTRL_COPYFROM;
 
     int vrc = VINF_SUCCESS;
@@ -2014,10 +2014,10 @@
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MKDIR, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKDIR, ch, &ValueUnion);
         }
     }
 
     if (!cDirsCreated)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MKDIR, "No directory to create specified!");
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKDIR, "No directory to create specified!");
     return rcExit;
 }
@@ -2135,10 +2135,10 @@
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RMDIR, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RMDIR, ch, &ValueUnion);
         }
     }
 
     if (!cDirRemoved)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RMDIR, "No directory to remove specified!");
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RMDIR, "No directory to remove specified!");
     return rcExit;
 }
@@ -2211,10 +2211,10 @@
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RM, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RM, ch, &ValueUnion);
         }
     }
 
     if (!cFilesDeleted && !fForce)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_RM, "No file to remove specified!");
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RM, "No file to remove specified!");
     return rcExit;
 }
@@ -2264,5 +2264,5 @@
 
                 default:
-                    return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MV, ch, &ValueUnion);
+                    return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV, ch, &ValueUnion);
             }
         }
@@ -2278,8 +2278,8 @@
     size_t cSources = vecSources.size();
     if (!cSources)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MV,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV,
                              "No source(s) to move specified!");
     if (cSources < 2)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MV,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV,
                              "No destination specified!");
 
@@ -2421,19 +2421,19 @@
                     strTemplate = ValueUnion.psz;
                 else
-                    return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MKTEMP,
+                    return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP,
                                          "More than one template specified!\n");
                 break;
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MKTEMP, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, ch, &ValueUnion);
         }
     }
 
     if (strTemplate.isEmpty())
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MKTEMP,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP,
                              "No template specified!");
 
     if (!fDirectory)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_MKTEMP,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP,
                              "Creating temporary files is currently not supported!");
 
@@ -2513,14 +2513,14 @@
             case 'c': /* Format */
             case 't': /* Terse */
-                return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_STAT,
+                return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT,
                                      "Command \"%s\" not implemented yet!", ValueUnion.psz);
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_STAT, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT, ch, &ValueUnion);
         }
     }
 
     if (ch != VINF_GETOPT_NOT_OPTION)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_STAT, "Nothing to stat!");
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT, "Nothing to stat!");
 
     RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx);
@@ -2668,5 +2668,5 @@
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_UPDATEGA, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_UPDATEGA, ch, &ValueUnion);
         }
     }
@@ -2786,5 +2786,5 @@
                     fListAll = true;
                 else
-                    return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_LIST,
+                    return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST,
                                          "Unknown list: '%s'", ValueUnion.psz);
                 fSeenListArg = true;
@@ -2792,10 +2792,10 @@
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_UPDATEGA, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_UPDATEGA, ch, &ValueUnion);
         }
     }
 
     if (!fSeenListArg)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_LIST, "Missing list name");
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST, "Missing list name");
     Assert(fListAll || fListSessions);
 
@@ -2972,27 +2972,27 @@
                     }
                     else
-                        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSEPROCESS, "Invalid PID value: 0");
+                        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, "Invalid PID value: 0");
                 }
                 else
-                    return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSEPROCESS, "Error parsing PID value: %Rrc", rc);
+                    return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, "Error parsing PID value: %Rrc", rc);
                 break;
             }
 
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSEPROCESS, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, ch, &ValueUnion);
         }
     }
 
     if (vecPID.empty())
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSEPROCESS,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS,
                              "At least one PID must be specified to kill!");
 
     if (   strSessionName.isEmpty()
         && idSession == UINT32_MAX)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSEPROCESS, "No session ID specified!");
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, "No session ID specified!");
 
     if (   strSessionName.isNotEmpty()
         && idSession != UINT32_MAX)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSEPROCESS,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS,
                              "Either session ID or name (pattern) must be specified");
 
@@ -3140,5 +3140,5 @@
                  *  break; */
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSESESSION, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION, ch, &ValueUnion);
         }
     }
@@ -3146,10 +3146,10 @@
     if (   strSessionName.isEmpty()
         && idSession == UINT32_MAX)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSESESSION,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION,
                              "No session ID specified!");
 
     if (   !strSessionName.isEmpty()
         && idSession != UINT32_MAX)
-        return errorSyntaxEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_CLOSESESSION,
+        return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION,
                              "Either session ID or name (pattern) must be specified");
 
@@ -3238,5 +3238,5 @@
             case VINF_GETOPT_NOT_OPTION:
             default:
-                return errorGetOptEx(USAGE_GUESTCONTROL, USAGE_GSTCTRL_WATCH, ch, &ValueUnion);
+                return errorGetOptEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WATCH, ch, &ValueUnion);
         }
     }
@@ -3326,43 +3326,43 @@
     static const GCTLCMDDEF s_aCmdDefs[] =
     {
-        { "run",                gctlHandleRun,              USAGE_GSTCTRL_RUN,       0, },
-        { "start",              gctlHandleStart,            USAGE_GSTCTRL_START,     0, },
-        { "copyfrom",           gctlHandleCopyFrom,         USAGE_GSTCTRL_COPYFROM,  0, },
-        { "copyto",             gctlHandleCopyTo,           USAGE_GSTCTRL_COPYTO,    0, },
-
-        { "mkdir",              gctrlHandleMkDir,           USAGE_GSTCTRL_MKDIR,     0, },
-        { "md",                 gctrlHandleMkDir,           USAGE_GSTCTRL_MKDIR,     0, },
-        { "createdirectory",    gctrlHandleMkDir,           USAGE_GSTCTRL_MKDIR,     0, },
-        { "createdir",          gctrlHandleMkDir,           USAGE_GSTCTRL_MKDIR,     0, },
-
-        { "rmdir",              gctlHandleRmDir,            USAGE_GSTCTRL_RMDIR,     0, },
-        { "removedir",          gctlHandleRmDir,            USAGE_GSTCTRL_RMDIR,     0, },
-        { "removedirectory",    gctlHandleRmDir,            USAGE_GSTCTRL_RMDIR,     0, },
-
-        { "rm",                 gctlHandleRm,               USAGE_GSTCTRL_RM,        0, },
-        { "removefile",         gctlHandleRm,               USAGE_GSTCTRL_RM,        0, },
-        { "erase",              gctlHandleRm,               USAGE_GSTCTRL_RM,        0, },
-        { "del",                gctlHandleRm,               USAGE_GSTCTRL_RM,        0, },
-        { "delete",             gctlHandleRm,               USAGE_GSTCTRL_RM,        0, },
-
-        { "mv",                 gctlHandleMv,               USAGE_GSTCTRL_MV,        0, },
-        { "move",               gctlHandleMv,               USAGE_GSTCTRL_MV,        0, },
-        { "ren",                gctlHandleMv,               USAGE_GSTCTRL_MV,        0, },
-        { "rename",             gctlHandleMv,               USAGE_GSTCTRL_MV,        0, },
-
-        { "mktemp",             gctlHandleMkTemp,           USAGE_GSTCTRL_MKTEMP,    0, },
-        { "createtemp",         gctlHandleMkTemp,           USAGE_GSTCTRL_MKTEMP,    0, },
-        { "createtemporary",    gctlHandleMkTemp,           USAGE_GSTCTRL_MKTEMP,    0, },
-
-        { "stat",               gctlHandleStat,             USAGE_GSTCTRL_STAT,      0, },
-
-        { "closeprocess",       gctlHandleCloseProcess,     USAGE_GSTCTRL_CLOSEPROCESS, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
-        { "closesession",       gctlHandleCloseSession,     USAGE_GSTCTRL_CLOSESESSION, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
-        { "list",               gctlHandleList,             USAGE_GSTCTRL_LIST,         GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
-        { "watch",              gctlHandleWatch,            USAGE_GSTCTRL_WATCH,        GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
-
-        {"updateguestadditions",gctlHandleUpdateAdditions,  USAGE_GSTCTRL_UPDATEGA,     GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
-        { "updateadditions",    gctlHandleUpdateAdditions,  USAGE_GSTCTRL_UPDATEGA,     GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
-        { "updatega",           gctlHandleUpdateAdditions,  USAGE_GSTCTRL_UPDATEGA,     GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+        { "run",                gctlHandleRun,              HELP_SCOPE_GSTCTRL_RUN,       0, },
+        { "start",              gctlHandleStart,            HELP_SCOPE_GSTCTRL_START,     0, },
+        { "copyfrom",           gctlHandleCopyFrom,         HELP_SCOPE_GSTCTRL_COPYFROM,  0, },
+        { "copyto",             gctlHandleCopyTo,           HELP_SCOPE_GSTCTRL_COPYTO,    0, },
+
+        { "mkdir",              gctrlHandleMkDir,           HELP_SCOPE_GSTCTRL_MKDIR,     0, },
+        { "md",                 gctrlHandleMkDir,           HELP_SCOPE_GSTCTRL_MKDIR,     0, },
+        { "createdirectory",    gctrlHandleMkDir,           HELP_SCOPE_GSTCTRL_MKDIR,     0, },
+        { "createdir",          gctrlHandleMkDir,           HELP_SCOPE_GSTCTRL_MKDIR,     0, },
+
+        { "rmdir",              gctlHandleRmDir,            HELP_SCOPE_GSTCTRL_RMDIR,     0, },
+        { "removedir",          gctlHandleRmDir,            HELP_SCOPE_GSTCTRL_RMDIR,     0, },
+        { "removedirectory",    gctlHandleRmDir,            HELP_SCOPE_GSTCTRL_RMDIR,     0, },
+
+        { "rm",                 gctlHandleRm,               HELP_SCOPE_GSTCTRL_RM,        0, },
+        { "removefile",         gctlHandleRm,               HELP_SCOPE_GSTCTRL_RM,        0, },
+        { "erase",              gctlHandleRm,               HELP_SCOPE_GSTCTRL_RM,        0, },
+        { "del",                gctlHandleRm,               HELP_SCOPE_GSTCTRL_RM,        0, },
+        { "delete",             gctlHandleRm,               HELP_SCOPE_GSTCTRL_RM,        0, },
+
+        { "mv",                 gctlHandleMv,               HELP_SCOPE_GSTCTRL_MV,        0, },
+        { "move",               gctlHandleMv,               HELP_SCOPE_GSTCTRL_MV,        0, },
+        { "ren",                gctlHandleMv,               HELP_SCOPE_GSTCTRL_MV,        0, },
+        { "rename",             gctlHandleMv,               HELP_SCOPE_GSTCTRL_MV,        0, },
+
+        { "mktemp",             gctlHandleMkTemp,           HELP_SCOPE_GSTCTRL_MKTEMP,    0, },
+        { "createtemp",         gctlHandleMkTemp,           HELP_SCOPE_GSTCTRL_MKTEMP,    0, },
+        { "createtemporary",    gctlHandleMkTemp,           HELP_SCOPE_GSTCTRL_MKTEMP,    0, },
+
+        { "stat",               gctlHandleStat,             HELP_SCOPE_GSTCTRL_STAT,      0, },
+
+        { "closeprocess",       gctlHandleCloseProcess,     HELP_SCOPE_GSTCTRL_CLOSEPROCESS, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+        { "closesession",       gctlHandleCloseSession,     HELP_SCOPE_GSTCTRL_CLOSESESSION, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+        { "list",               gctlHandleList,             HELP_SCOPE_GSTCTRL_LIST,         GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+        { "watch",              gctlHandleWatch,            HELP_SCOPE_GSTCTRL_WATCH,        GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+
+        {"updateguestadditions",gctlHandleUpdateAdditions,  HELP_SCOPE_GSTCTRL_UPDATEGA,     GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+        { "updateadditions",    gctlHandleUpdateAdditions,  HELP_SCOPE_GSTCTRL_UPDATEGA,     GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
+        { "updatega",           gctlHandleUpdateAdditions,  HELP_SCOPE_GSTCTRL_UPDATEGA,     GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER, },
     };
 
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 77595)
@@ -24,4 +24,5 @@
 #include <iprt/buildconfig.h>
 #include <iprt/ctype.h>
+#include <iprt/assert.h>
 #include <iprt/env.h>
 #include <iprt/err.h>
@@ -45,7 +46,7 @@
 *********************************************************************************************************************************/
 #ifndef VBOX_ONLY_DOCS
-enum HELP_CMD_VBOXMANAGE    g_enmCurCommand = HELP_CMD_VBOXMANAGE_INVALID;
-/** The scope maskt for the current subcommand. */
-uint64_t                    g_fCurSubcommandScope = RTMSGREFENTRYSTR_SCOPE_GLOBAL;
+static enum HELP_CMD_VBOXMANAGE    g_enmCurCommand = HELP_CMD_VBOXMANAGE_INVALID;
+/** The scope mask for the current subcommand. */
+static uint64_t                    g_fCurSubcommandScope = RTMSGREFENTRYSTR_SCOPE_GLOBAL;
 
 /**
@@ -366,5 +367,5 @@
 
 
-void printUsage(USAGECATEGORY fCategory, uint32_t fSubCategory, PRTSTREAM pStrm)
+void printUsage(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, PRTSTREAM pStrm)
 {
     bool fDumpOpts = false;
@@ -400,5 +401,8 @@
 #endif
 
-    if (fCategory == USAGE_DUMPOPTS)
+    Assert(enmCommand != USAGE_INVALID);
+    Assert(enmCommand != USAGE_S_NEWCMD);
+
+    if (enmCommand == USAGE_S_DUMPOPTS)
     {
         fDumpOpts = true;
@@ -409,5 +413,5 @@
         fDarwin = true;
         fVBoxSDL = true;
-        fCategory = USAGE_ALL;
+        enmCommand = USAGE_S_ALL;
     }
 
@@ -416,5 +420,5 @@
                  "\n");
 
-    if (fCategory == USAGE_ALL)
+    if (enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                      "  VBoxManage [<general option>] <command>\n"
@@ -431,5 +435,5 @@
     const char *pcszSep1 = " ";
     const char *pcszSep2 = "         ";
-    if (fCategory != USAGE_ALL)
+    if (enmCommand != USAGE_S_ALL)
     {
         pcszSep1 = "VBoxManage";
@@ -439,5 +443,5 @@
 #define SEP pcszSep1, pcszSep2
 
-    if (fCategory & USAGE_LIST)
+    if (enmCommand == USAGE_LIST || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s list [--long|-l] [--sorted|-s]%s vms|runningvms|ostypes|hostdvds|hostfloppies|\n"
@@ -453,5 +457,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_SHOWVMINFO)
+    if (enmCommand == USAGE_SHOWVMINFO || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s showvminfo %s      <uuid|vmname> [--details]\n"
@@ -460,15 +464,15 @@
                      "\n", SEP, SEP);
 
-    if (fCategory & USAGE_REGISTERVM)
+    if (enmCommand == USAGE_REGISTERVM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s registervm %s      <filename>\n"
                      "\n", SEP);
 
-    if (fCategory & USAGE_UNREGISTERVM)
+    if (enmCommand == USAGE_UNREGISTERVM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s unregistervm %s    <uuid|vmname> [--delete]\n"
                      "\n", SEP);
 
-    if (fCategory & USAGE_CREATEVM)
+    if (enmCommand == USAGE_CREATEVM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s createvm %s        --name <name>\n"
@@ -481,5 +485,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_MODIFYVM)
+    if (enmCommand == USAGE_MODIFYVM || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -730,5 +734,5 @@
     }
 
-    if (fCategory & USAGE_CLONEVM)
+    if (enmCommand == USAGE_CLONEVM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s clonevm %s         <uuid|vmname>\n"
@@ -744,5 +748,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_MOVEVM)
+    if (enmCommand == USAGE_MOVEVM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s movevm %s          <uuid|vmname>\n"
@@ -751,5 +755,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_IMPORTAPPLIANCE)
+    if (enmCommand == USAGE_IMPORTAPPLIANCE || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s import %s          <ovfname/ovaname>\n"
@@ -760,5 +764,5 @@
                      "                             for a particular OVF)\n\n", SEP);
 
-    if (fCategory & USAGE_EXPORTAPPLIANCE)
+    if (enmCommand == USAGE_EXPORTAPPLIANCE || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s export %s          <machines> --output|-o <name>.<ovf/ova/tar.gz>\n"
@@ -791,5 +795,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_STARTVM)
+    if (enmCommand == USAGE_STARTVM || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -804,5 +808,5 @@
     }
 
-    if (fCategory & USAGE_CONTROLVM)
+    if (enmCommand == USAGE_CONTROLVM || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -884,15 +888,15 @@
     }
 
-    if (fCategory & USAGE_DISCARDSTATE)
+    if (enmCommand == USAGE_DISCARDSTATE || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s discardstate %s    <uuid|vmname>\n"
                      "\n", SEP);
 
-    if (fCategory & USAGE_ADOPTSTATE)
+    if (enmCommand == USAGE_ADOPTSTATE || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s adoptstate %s      <uuid|vmname> <state_file>\n"
                      "\n", SEP);
 
-    if (fCategory & USAGE_SNAPSHOT)
+    if (enmCommand == USAGE_SNAPSHOT || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s snapshot %s        <uuid|vmname>\n"
@@ -909,5 +913,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_CLOSEMEDIUM)
+    if (enmCommand == USAGE_CLOSEMEDIUM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s closemedium %s     [disk|dvd|floppy] <uuid|filename>\n"
@@ -915,5 +919,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_STORAGEATTACH)
+    if (enmCommand == USAGE_STORAGEATTACH || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s storageattach %s   <uuid|vmname>\n"
@@ -948,5 +952,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_STORAGECONTROLLER)
+    if (enmCommand == USAGE_STORAGECONTROLLER || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s storagectl %s      <uuid|vmname>\n"
@@ -963,5 +967,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_BANDWIDTHCONTROL)
+    if (enmCommand == USAGE_BANDWIDTHCONTROL || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s bandwidthctl %s    <uuid|vmname>\n"
@@ -976,10 +980,10 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_SHOWMEDIUMINFO)
+    if (enmCommand == USAGE_SHOWMEDIUMINFO || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s showmediuminfo %s  [disk|dvd|floppy] <uuid|filename>\n"
                      "\n", SEP);
 
-    if (fCategory & USAGE_CREATEMEDIUM)
+    if (enmCommand == USAGE_CREATEMEDIUM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s createmedium %s    [disk|dvd|floppy] --filename <filename>\n"
@@ -991,5 +995,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_MODIFYMEDIUM)
+    if (enmCommand == USAGE_MODIFYMEDIUM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s modifymedium %s    [disk|dvd|floppy] <uuid|filename>\n"
@@ -1005,5 +1009,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_CLONEMEDIUM)
+    if (enmCommand == USAGE_CLONEMEDIUM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s clonemedium %s     [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>\n"
@@ -1013,5 +1017,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_MEDIUMPROPERTY)
+    if (enmCommand == USAGE_MEDIUMPROPERTY || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s mediumproperty %s  [disk|dvd|floppy] set <uuid|filename>\n"
@@ -1025,5 +1029,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_ENCRYPTMEDIUM)
+    if (enmCommand == USAGE_ENCRYPTMEDIUM || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s encryptmedium %s   <uuid|filename>\n"
@@ -1034,5 +1038,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_MEDIUMENCCHKPWD)
+    if (enmCommand == USAGE_MEDIUMENCCHKPWD || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s checkmediumpwd %s  <uuid|filename>\n"
@@ -1040,5 +1044,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_CONVERTFROMRAW)
+    if (enmCommand == USAGE_CONVERTFROMRAW || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s convertfromraw %s  <filename> <outputfile>\n"
@@ -1052,5 +1056,5 @@
                      "\n", SEP, SEP);
 
-    if (fCategory & USAGE_GETEXTRADATA)
+    if (enmCommand == USAGE_GETEXTRADATA || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s getextradata %s    global|<uuid|vmname>\n"
@@ -1058,5 +1062,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_SETEXTRADATA)
+    if (enmCommand == USAGE_SETEXTRADATA || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s setextradata %s    global|<uuid|vmname>\n"
@@ -1065,5 +1069,5 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_SETPROPERTY)
+    if (enmCommand == USAGE_SETPROPERTY || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s setproperty %s     machinefolder default|<folder> |\n"
@@ -1080,68 +1084,74 @@
                      "\n", SEP);
 
-    if (fCategory & USAGE_USBFILTER_ADD)
-        RTStrmPrintf(pStrm,
-                           "%s usbfilter %s       add <index,0-N>\n"
-                     "                            --target <uuid|vmname>|global\n"
-                     "                            --name <string>\n"
-                     "                            --action ignore|hold (global filters only)\n"
-                     "                            [--active yes|no] (yes)\n"
-                     "                            [--vendorid <XXXX>] (null)\n"
-                     "                            [--productid <XXXX>] (null)\n"
-                     "                            [--revision <IIFF>] (null)\n"
-                     "                            [--manufacturer <string>] (null)\n"
-                     "                            [--product <string>] (null)\n"
-                     "                            [--remote yes|no] (null, VM filters only)\n"
-                     "                            [--serialnumber <string>] (null)\n"
-                     "                            [--maskedinterfaces <XXXXXXXX>]\n"
-                     "\n", SEP);
-
-    if (fCategory & USAGE_USBFILTER_MODIFY)
-        RTStrmPrintf(pStrm,
-                           "%s usbfilter %s       modify <index,0-N>\n"
-                     "                            --target <uuid|vmname>|global\n"
-                     "                            [--name <string>]\n"
-                     "                            [--action ignore|hold] (global filters only)\n"
-                     "                            [--active yes|no]\n"
-                     "                            [--vendorid <XXXX>|\"\"]\n"
-                     "                            [--productid <XXXX>|\"\"]\n"
-                     "                            [--revision <IIFF>|\"\"]\n"
-                     "                            [--manufacturer <string>|\"\"]\n"
-                     "                            [--product <string>|\"\"]\n"
-                     "                            [--remote yes|no] (null, VM filters only)\n"
-                     "                            [--serialnumber <string>|\"\"]\n"
-                     "                            [--maskedinterfaces <XXXXXXXX>]\n"
-                     "\n", SEP);
-
-    if (fCategory & USAGE_USBFILTER_REMOVE)
-        RTStrmPrintf(pStrm,
-                           "%s usbfilter %s       remove <index,0-N>\n"
-                     "                            --target <uuid|vmname>|global\n"
-                     "\n", SEP);
-
-    if (fCategory & USAGE_SHAREDFOLDER_ADD)
-        RTStrmPrintf(pStrm,
-                           "%s sharedfolder %s    add <uuid|vmname>\n"
-                     "                            --name <name> --hostpath <hostpath>\n"
-                     "                            [--transient] [--readonly] [--automount]\n"
-                     "\n", SEP);
-
-    if (fCategory & USAGE_SHAREDFOLDER_REMOVE)
-        RTStrmPrintf(pStrm,
-                           "%s sharedfolder %s    remove <uuid|vmname>\n"
-                     "                            --name <name> [--transient]\n"
-                     "\n", SEP);
+    if (enmCommand == USAGE_USBFILTER || enmCommand == USAGE_S_ALL)
+    {
+        if (fSubcommandScope & HELP_SCOPE_USBFILTER_ADD)
+            RTStrmPrintf(pStrm,
+                               "%s usbfilter %s       add <index,0-N>\n"
+                         "                            --target <uuid|vmname>|global\n"
+                         "                            --name <string>\n"
+                         "                            --action ignore|hold (global filters only)\n"
+                         "                            [--active yes|no] (yes)\n"
+                         "                            [--vendorid <XXXX>] (null)\n"
+                         "                            [--productid <XXXX>] (null)\n"
+                         "                            [--revision <IIFF>] (null)\n"
+                         "                            [--manufacturer <string>] (null)\n"
+                         "                            [--product <string>] (null)\n"
+                         "                            [--remote yes|no] (null, VM filters only)\n"
+                         "                            [--serialnumber <string>] (null)\n"
+                         "                            [--maskedinterfaces <XXXXXXXX>]\n"
+                         "\n", SEP);
+
+        if (fSubcommandScope & HELP_SCOPE_USBFILTER_MODIFY)
+            RTStrmPrintf(pStrm,
+                               "%s usbfilter %s       modify <index,0-N>\n"
+                         "                            --target <uuid|vmname>|global\n"
+                         "                            [--name <string>]\n"
+                         "                            [--action ignore|hold] (global filters only)\n"
+                         "                            [--active yes|no]\n"
+                         "                            [--vendorid <XXXX>|\"\"]\n"
+                         "                            [--productid <XXXX>|\"\"]\n"
+                         "                            [--revision <IIFF>|\"\"]\n"
+                         "                            [--manufacturer <string>|\"\"]\n"
+                         "                            [--product <string>|\"\"]\n"
+                         "                            [--remote yes|no] (null, VM filters only)\n"
+                         "                            [--serialnumber <string>|\"\"]\n"
+                         "                            [--maskedinterfaces <XXXXXXXX>]\n"
+                         "\n", SEP);
+
+        if (fSubcommandScope & HELP_SCOPE_USBFILTER_REMOVE)
+            RTStrmPrintf(pStrm,
+                               "%s usbfilter %s       remove <index,0-N>\n"
+                         "                            --target <uuid|vmname>|global\n"
+                         "\n", SEP);
+    }
+
+    if (enmCommand == USAGE_SHAREDFOLDER || enmCommand == USAGE_S_ALL)
+    {
+        if (fSubcommandScope & HELP_SCOPE_SHAREDFOLDER_ADD)
+            RTStrmPrintf(pStrm,
+                               "%s sharedfolder %s    add <uuid|vmname>\n"
+                         "                            --name <name> --hostpath <hostpath>\n"
+                         "                            [--transient] [--readonly] [--automount]\n"
+                         "\n", SEP);
+
+        if (fSubcommandScope & HELP_SCOPE_SHAREDFOLDER_REMOVE)
+            RTStrmPrintf(pStrm,
+                               "%s sharedfolder %s    remove <uuid|vmname>\n"
+                         "                            --name <name> [--transient]\n"
+                         "\n", SEP);
+    }
 
 #ifdef VBOX_WITH_GUEST_PROPS
-    if (fCategory & USAGE_GUESTPROPERTY)
+    if (enmCommand == USAGE_GUESTPROPERTY || enmCommand == USAGE_S_ALL)
         usageGuestProperty(pStrm, SEP);
 #endif /* VBOX_WITH_GUEST_PROPS defined */
 
 #ifdef VBOX_WITH_GUEST_CONTROL
-    if (fCategory & USAGE_GUESTCONTROL)
-        usageGuestControl(pStrm, SEP, fSubCategory);
+    if (enmCommand == USAGE_GUESTCONTROL || enmCommand == USAGE_S_ALL)
+        usageGuestControl(pStrm, SEP, fSubcommandScope);
 #endif /* VBOX_WITH_GUEST_CONTROL defined */
 
-    if (fCategory & USAGE_METRICS)
+    if (enmCommand == USAGE_METRICS || enmCommand == USAGE_S_ALL)
         RTStrmPrintf(pStrm,
                            "%s metrics %s         list [*|host|<vmname> [<metric_list>]]\n"
@@ -1168,5 +1178,5 @@
 
 #if defined(VBOX_WITH_NAT_SERVICE)
-    if (fCategory & USAGE_NATNETWORK)
+    if (enmCommand == USAGE_NATNETWORK || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -1200,5 +1210,5 @@
 
 #if defined(VBOX_WITH_NETFLT)
-    if (fCategory & USAGE_HOSTONLYIFS)
+    if (enmCommand == USAGE_HOSTONLYIFS || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -1215,5 +1225,5 @@
 #endif
 
-    if (fCategory & USAGE_DHCPSERVER)
+    if (enmCommand == USAGE_DHCPSERVER || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -1237,5 +1247,5 @@
     }
 
-    if (fCategory & USAGE_USBDEVSOURCE)
+    if (enmCommand == USAGE_USBDEVSOURCE || enmCommand == USAGE_S_ALL)
     {
         RTStrmPrintf(pStrm,
@@ -1248,5 +1258,5 @@
 
 #ifndef VBOX_ONLY_DOCS /* Converted to man page, not needed. */
-    if (fCategory == USAGE_ALL)
+    if (enmCommand == USAGE_S_ALL)
     {
         uint32_t cPendingBlankLines = 0;
@@ -1270,5 +1280,5 @@
  * @returns RTEXITCODE_SYNTAX.
  */
-RTEXITCODE errorSyntax(USAGECATEGORY fCategory, const char *pszFormat, ...)
+RTEXITCODE errorSyntax(USAGECATEGORY enmCommand, const char *pszFormat, ...)
 {
     va_list args;
@@ -1276,9 +1286,9 @@
 #ifndef VBOX_ONLY_DOCS
     if (g_fInternalMode)
-        printUsageInternal(fCategory, g_pStdErr);
+        printUsageInternal(enmCommand, g_pStdErr);
     else
-        printUsage(fCategory, ~0U, g_pStdErr);
+        printUsage(enmCommand, RTMSGREFENTRYSTR_SCOPE_GLOBAL, g_pStdErr);
 #else
-    RT_NOREF_PV(fCategory);
+    RT_NOREF_PV(enmCommand);
 #endif
     va_start(args, pszFormat);
@@ -1292,5 +1302,5 @@
  * @returns RTEXITCODE_SYNTAX.
  */
-RTEXITCODE errorSyntaxEx(USAGECATEGORY fCategory, uint32_t fSubCategory, const char *pszFormat, ...)
+RTEXITCODE errorSyntaxEx(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, const char *pszFormat, ...)
 {
     va_list args;
@@ -1298,9 +1308,9 @@
 #ifndef VBOX_ONLY_DOCS
     if (g_fInternalMode)
-        printUsageInternal(fCategory, g_pStdErr);
+        printUsageInternal(enmCommand, g_pStdErr);
     else
-        printUsage(fCategory, fSubCategory, g_pStdErr);
+        printUsage(enmCommand, fSubcommandScope, g_pStdErr);
 #else
-    RT_NOREF2(fCategory, fSubCategory);
+    RT_NOREF2(enmCommand, fSubcommandScope);
 #endif
     va_start(args, pszFormat);
@@ -1315,10 +1325,11 @@
  * @returns RTEXITCODE_SYNTAX.
  *
- * @param   fCategory          The usage category of the command.
- * @param   fSubCategory         The usage sub-category of the command.
- * @param   rc              The RTGetOpt return code.
- * @param   pValueUnion     The value union.
- */
-RTEXITCODE errorGetOptEx(USAGECATEGORY fCategory, uint32_t fSubCategory, int rc, union RTGETOPTUNION const *pValueUnion)
+ * @param   enmCommand          The command.
+ * @param   fSubcommandScope    The subcommand scope, REFENTRYSTR_SCOPE_GLOBAL
+ *                              for all.
+ * @param   rc                  The RTGetOpt return code.
+ * @param   pValueUnion         The value union.
+ */
+RTEXITCODE errorGetOptEx(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, int rc, union RTGETOPTUNION const *pValueUnion)
 {
     /*
@@ -1338,7 +1349,7 @@
 #ifndef VBOX_ONLY_DOCS
         if (g_fInternalMode)
-            printUsageInternal(fCategory, g_pStdOut);
+            printUsageInternal(enmCommand, g_pStdOut);
         else
-            printUsage(fCategory, fSubCategory, g_pStdOut);
+            printUsage(enmCommand, fSubcommandScope, g_pStdOut);
 #endif
         return RTEXITCODE_SUCCESS;
@@ -1351,9 +1362,9 @@
 #ifndef VBOX_ONLY_DOCS
     if (g_fInternalMode)
-        printUsageInternal(fCategory, g_pStdErr);
+        printUsageInternal(enmCommand, g_pStdErr);
     else
-        printUsage(fCategory, fSubCategory, g_pStdErr);
+        printUsage(enmCommand, fSubcommandScope, g_pStdErr);
 #else
-    RT_NOREF2(fCategory, fSubCategory);
+    RT_NOREF2(enmCommand, fSubcommandScope);
 #endif
 
@@ -1380,11 +1391,11 @@
  * @returns RTEXITCODE_SYNTAX.
  *
- * @param   fUsageCategory  The usage category of the command.
+ * @param   enmCommand      The command.
  * @param   rc              The RTGetOpt return code.
  * @param   pValueUnion     The value union.
  */
-RTEXITCODE errorGetOpt(USAGECATEGORY fCategory, int rc, union RTGETOPTUNION const *pValueUnion)
-{
-    return errorGetOptEx(fCategory, ~0U, rc, pValueUnion);
+RTEXITCODE errorGetOpt(USAGECATEGORY enmCommand, int rc, union RTGETOPTUNION const *pValueUnion)
+{
+    return errorGetOptEx(enmCommand, RTMSGREFENTRYSTR_SCOPE_GLOBAL, rc, pValueUnion);
 }
 
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 77595)
@@ -1086,5 +1086,5 @@
         /* we need at least four more parameters */
         if (a->argc < 5)
-            return errorSyntax(USAGE_SHAREDFOLDER_ADD, "Not enough parameters");
+            return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_ADD, "Not enough parameters");
 
         char *name = NULL;
@@ -1136,14 +1136,14 @@
             }
             else
-                return errorSyntax(USAGE_SHAREDFOLDER_ADD, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
+                return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_ADD, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
         }
 
         if (NULL != strstr(name, " "))
-            return errorSyntax(USAGE_SHAREDFOLDER_ADD, "No spaces allowed in parameter '-name'!");
+            return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_ADD, "No spaces allowed in parameter '-name'!");
 
         /* required arguments */
         if (!name || !hostpath)
         {
-            return errorSyntax(USAGE_SHAREDFOLDER_ADD, "Parameters --name and --hostpath are required");
+            return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_ADD, "Parameters --name and --hostpath are required");
         }
 
@@ -1190,5 +1190,5 @@
         /* we need at least two more parameters */
         if (a->argc < 3)
-            return errorSyntax(USAGE_SHAREDFOLDER_REMOVE, "Not enough parameters");
+            return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_REMOVE, "Not enough parameters");
 
         char *name = NULL;
@@ -1211,10 +1211,10 @@
             }
             else
-                return errorSyntax(USAGE_SHAREDFOLDER_REMOVE, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
+                return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_REMOVE, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
         }
 
         /* required arguments */
         if (!name)
-            return errorSyntax(USAGE_SHAREDFOLDER_REMOVE, "Parameter --name is required");
+            return errorSyntaxEx(USAGE_SHAREDFOLDER, HELP_SCOPE_SHAREDFOLDER_REMOVE, "Parameter --name is required");
 
         if (fTransient)
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp	(revision 77594)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp	(revision 77595)
@@ -198,7 +198,7 @@
             {
                 if (cmd.mAction == USBFilterCmd::Add)
-                    return errorSyntax(USAGE_USBFILTER_ADD, "Not enough parameters");
-
-                return errorSyntax(USAGE_USBFILTER_MODIFY, "Not enough parameters");
+                    return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, "Not enough parameters");
+
+                return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_MODIFY, "Not enough parameters");
             }
 
@@ -329,5 +329,5 @@
                 }
                 else
-                    return errorSyntax(cmd.mAction == USBFilterCmd::Add ? USAGE_USBFILTER_ADD : USAGE_USBFILTER_MODIFY,
+                    return errorSyntaxEx(USAGE_USBFILTER, cmd.mAction == USBFilterCmd::Add ? HELP_SCOPE_USBFILTER_ADD : HELP_SCOPE_USBFILTER_MODIFY,
                                        "Unknown option '%s'", a->argv[i]);
             }
@@ -347,5 +347,5 @@
                    )
                 {
-                    return errorSyntax(USAGE_USBFILTER_ADD, "Mandatory options not supplied");
+                    return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, "Mandatory options not supplied");
                 }
             }
@@ -357,5 +357,5 @@
             /* at least: 0: command, 1: index, 2: --target, 3: <target value> */
             if (a->argc < 4)
-                return errorSyntax(USAGE_USBFILTER_REMOVE, "Not enough parameters");
+                return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, "Not enough parameters");
 
             for (int i = 2; i < a->argc; i++)
@@ -379,5 +379,5 @@
             // mandatory options
             if (!cmd.mGlobal && !cmd.mMachine)
-                return errorSyntax(USAGE_USBFILTER_REMOVE, "Mandatory options not supplied");
+                return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, "Mandatory options not supplied");
 
             break;
