Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlInterface.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlInterface.cpp	(revision 71066)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlInterface.cpp	(revision 71067)
@@ -93,4 +93,7 @@
 {
 public:
+    CommandData()
+        : m_bSessionIdGiven(false)
+        , m_bSessionNameGiven(false){}
     QString m_strUserName;
     QString m_strPassword;
@@ -99,4 +102,6 @@
     ULONG   m_uSessionId;
     QString m_strDomain;
+    bool    m_bSessionIdGiven;
+    bool    m_bSessionNameGiven;
     QVector<QString> m_arguments;
     QVector<QString> m_environmentChanges;
@@ -106,6 +111,5 @@
     :QObject(parent)
     , m_comGuest(comGuest)
-    , m_strHelp("[common-options]      [--verbose|-v] [--quiet|-q]\n"
-                "                                   [--username <name>] [--domain <domain>]\n"
+    , m_strHelp("[common-options]               [--username <name>] [--domain <domain>]\n"
                 "                                   [--passwordfile <file> | --password <password>]\n"
                 "start                           [common-options]\n"
@@ -115,8 +119,16 @@
                 "                                   [--ignore-operhaned-processes] [--profile]\n"
                 "                                   -- <program/arg0> [argument1] ... [argumentN]]\n"
-                "create                           [common-options]  [--sessionname <name>]\n"
+                "createsession                      [common-options]  [--sessionname <name>]\n"
+                "mkdir                           [common-options]\n"
+                "                                   [--path <path>]\n"
+                "                                   [--sessionid <id> |  [sessionname <name>]]\n"
                 )
 {
     prepareSubCommandHandlers();
+}
+
+bool UIGuestControlInterface::handleMkdir(int, char**)
+{
+    return true;
 }
 
@@ -153,7 +165,4 @@
     };
 
-    bool sessionNameGiven = false;
-    bool sessionIdGiven = false;
-
     int ch;
     RTGETOPTUNION ValueUnion;
@@ -166,9 +175,9 @@
             HANDLE_COMMON_OPTION_DEFS()
             case GCTLCMD_COMMON_OPT_SESSION_NAME:
-                sessionNameGiven = true;
+                commandData.m_bSessionNameGiven = true;
                 commandData.m_strSessionName  = ValueUnion.psz;
                 break;
             case GCTLCMD_COMMON_OPT_SESSION_ID:
-                sessionIdGiven = true;
+                commandData.m_bSessionIdGiven = true;
                 commandData.m_uSessionId  = ValueUnion.i32;
                 break;
@@ -183,6 +192,11 @@
         }
     }
-
-    if (sessionNameGiven && commandData.m_strSessionName.isEmpty())
+    if (commandData.m_strExePath.isEmpty())
+    {
+        emit sigOutputString(QString(m_strHelp).append("Syntax error! No executable is given\n"));
+        return false;
+    }
+
+    if (commandData.m_bSessionNameGiven && commandData.m_strSessionName.isEmpty())
     {
         emit sigOutputString(QString(m_strHelp).append("'Session Name' is not name valid\n"));
@@ -192,5 +206,5 @@
     CGuestSession guestSession;
     /* Check if sessionname and sessionid are both supplied */
-    if (sessionIdGiven && sessionNameGiven)
+    if (commandData.m_bSessionIdGiven && commandData.m_bSessionNameGiven)
     {
         emit sigOutputString(QString(m_strHelp).append("Both 'Session Name' and 'Session Id' are supplied\n"));
@@ -198,5 +212,5 @@
     }
     /* If sessionid is given then look for the session. if not found return without starting the process: */
-    else if (sessionIdGiven && !sessionNameGiven)
+    else if (commandData.m_bSessionIdGiven && !commandData.m_bSessionNameGiven)
     {
         if (!findSession(commandData.m_uSessionId, guestSession))
@@ -207,5 +221,5 @@
     }
     /* If sessionname is given then look for the session. if not try to create a session with the provided name: */
-    else if (!sessionIdGiven && sessionNameGiven)
+    else if (!commandData.m_bSessionIdGiven && commandData.m_bSessionNameGiven)
     {
         if (!findSession(commandData.m_strSessionName, guestSession))
@@ -240,5 +254,5 @@
 }
 
-bool UIGuestControlInterface::handleCreate(int argc, char** argv)
+bool UIGuestControlInterface::handleCreateSession(int argc, char** argv)
 {
     CommandData commandData;
@@ -298,7 +312,8 @@
 void UIGuestControlInterface::prepareSubCommandHandlers()
 {
-    m_subCommandHandlers.insert("create" , &UIGuestControlInterface::handleCreate);
+    m_subCommandHandlers.insert("createsession" , &UIGuestControlInterface::handleCreateSession);
     m_subCommandHandlers.insert("start", &UIGuestControlInterface::handleStart);
     m_subCommandHandlers.insert("help" , &UIGuestControlInterface::handleHelp);
+    m_subCommandHandlers.insert("mkdir" , &UIGuestControlInterface::handleMkdir);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlInterface.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlInterface.h	(revision 71066)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlInterface.h	(revision 71067)
@@ -30,4 +30,7 @@
 class UIGuestControlSubCommandBase;
 class CommandData;
+
+/** UIGuestControlInterface parses a command string and  issues API calls
+    accordingly to achive guest control related operations */
 class UIGuestControlInterface : public QObject
 {
@@ -65,6 +68,7 @@
     bool handleHelp(int, char**);
     /* Handles the 'create' session command */
-    bool handleCreate(int, char**);
-
+    bool handleCreateSession(int, char**);
+    /* Handles the 'mkdir' session command to create guest directories */
+    bool handleMkdir(int, char**);
 
     CGuest        m_comGuest;
