Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp	(revision 36754)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp	(revision 36755)
@@ -717,5 +717,4 @@
 
 
-#ifdef VBOXSERVICE_TOOLBOX
 /**
  * Constructs the argv command line by resolving environment variables
@@ -731,49 +730,40 @@
                                              const char * const *papszArgs, char ***ppapszArgv)
 {
-    AssertPtrReturn(pszArgv0, VERR_INVALID_PARAMETER);
-    AssertPtrReturn(ppapszArgv, VERR_INVALID_PARAMETER);
-
 /** @todo RTGetOptArgvToString converts to MSC quoted string, while
  *        RTGetOptArgvFromString takes bourne shell according to the docs...
  * Actually, converting to and from here is a very roundabout way of prepending
  * an entry (pszFilename) to an array (*ppapszArgv). */
-    char *pszArgs;
-    int rc = RTGetOptArgvToString(&pszArgs, papszArgs,
+    int rc = VINF_SUCCESS;
+    char *pszNewArgs = NULL;
+    if (pszArgv0)
+        rc = RTStrAAppend(&pszNewArgs, pszArgv0);
+    if (   RT_SUCCESS(rc)
+        && papszArgs)
+
+    {
+        char *pszArgs;
+        rc = RTGetOptArgvToString(&pszArgs, papszArgs,
                                   RTGETOPTARGV_CNV_QUOTE_MS_CRT); /* RTGETOPTARGV_CNV_QUOTE_BOURNE_SH */
-    if (   RT_SUCCESS(rc)
-        && *pszArgs)
-    {
-        /*
-         * Construct the new command line by appending the actual
-         * tool name to new process' command line.
-         */
-        char szArgsExp[RTPATH_MAX];
-        rc = VBoxServiceControlExecMakeFullPath(pszArgs, szArgsExp, sizeof(szArgsExp));
         if (RT_SUCCESS(rc))
         {
-            char *pszNewArgs;
-            if (RTStrAPrintf(&pszNewArgs, "%s %s", pszArgv0, szArgsExp))
-            {
-#ifdef DEBUG
-                VBoxServiceVerbose(3, "ControlExec: VBoxServiceControlExecPrepareArgv: %s\n",
-                                   pszNewArgs);
-#endif
-                int iNumArgsIgnored;
-                rc = RTGetOptArgvFromString(ppapszArgv, &iNumArgsIgnored,
-                                            pszNewArgs, NULL /* Use standard separators. */);
-                RTStrFree(pszNewArgs);
-            }
-        }
-        RTStrFree(pszArgs);
-    }
-    else /* No arguments given, just use the resolved file name as argv[0]. */
+            rc = RTStrAAppend(&pszNewArgs, " ");
+            if (RT_SUCCESS(rc))
+                rc = RTStrAAppend(&pszNewArgs, pszArgs);
+        }
+    }
+
+    if (RT_SUCCESS(rc))
     {
         int iNumArgsIgnored;
         rc = RTGetOptArgvFromString(ppapszArgv, &iNumArgsIgnored,
-                                    pszArgv0, NULL /* Use standard separators. */);
-    }
-    return rc;
-}
-#endif
+                                    pszNewArgs ? pszNewArgs : "", NULL /* Use standard separators. */);
+    }
+
+VBoxServiceVerbose(3, "args: %s\n", pszNewArgs);
+
+    if (pszNewArgs)
+        RTStrFree(pszNewArgs);
+    return rc;
+}
 
 
@@ -834,5 +824,5 @@
         {
             char **papszArgsExp;
-            rc = VBoxServiceControlExecPrepareArgv(szSysprepCmd /* argv0 */, &papszArgs[1], &papszArgsExp);
+            rc = VBoxServiceControlExecPrepareArgv(szSysprepCmd /* argv0 */, papszArgs, &papszArgsExp);
             if (RT_SUCCESS(rc))
             {
@@ -867,5 +857,6 @@
     {
         char **papszArgsExp;
-        rc = VBoxServiceControlExecPrepareArgv(papszArgs[0], &papszArgs[1], &papszArgsExp);
+        rc = VBoxServiceControlExecPrepareArgv(pszExec /* Always use the unmodified executable name as argv0. */,
+                                               papszArgs /* Append the rest of the argument vector (if any). */, &papszArgsExp);
         if (RT_SUCCESS(rc))
         {
@@ -888,7 +879,10 @@
 #ifdef DEBUG
             VBoxServiceVerbose(3, "Command: %s\n", szExecExp);
-            for (size_t i = 0; papszArgsExp[i]; i++)
-                VBoxServiceVerbose(3, "\targv[%ld]: %s\n", i, papszArgsExp[i]);
+            for (size_t i = 0; papszArgs[i]; i++)
+                VBoxServiceVerbose(3, "\targv[%ld]: %s\n", i, papszArgs[i]);
 #endif
+
+    VBoxServiceVerbose(3, "%p %p %p\n", papszArgs, papszArgs[0], papszArgs[1]);
+
             /* Do normal execution. */
             rc = RTProcCreateEx(szExecExp, papszArgsExp, hEnv, uProcFlags,
Index: /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 36754)
+++ /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 36755)
@@ -256,5 +256,4 @@
                         }
 
-                        args.push_back(Bstr(VBOXSERVICE_TOOL_CAT).raw()); /* The actual (internal) tool to use (as argv[0]). */
                         args.push_back(Bstr(szOutput).raw());             /* We want to write a file ... */
                     }
@@ -569,5 +568,4 @@
                 com::SafeArray<IN_BSTR> env;
 
-                args.push_back(Bstr(VBOXSERVICE_TOOL_CAT).raw());     /* The actual (internal) tool to use (as argv[0]). */
                 args.push_back(Bstr("--output").raw());               /* We want to write a file ... */
                 args.push_back(Bstr(strInstallerPath.c_str()).raw()); /* ... with this path. */
@@ -2405,5 +2403,4 @@
          * Prepare tool command line.
          */
-        args.push_back(Bstr(VBOXSERVICE_TOOL_MKDIR).raw()); /* The actual (internal) tool to use (as argv[0]). */
         if (aFlags & CreateDirectoryFlag_Parents)
             args.push_back(Bstr("--parents").raw());        /* We also want to create the parent directories. */
