Index: /trunk/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp	(revision 27513)
+++ /trunk/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp	(revision 27514)
@@ -75,4 +75,5 @@
 };
 
+
 static int tstRTCreateProcEx5Child(int argc, char **argv)
 {
@@ -139,7 +140,7 @@
 }
 
-static void tstRTCreateProcEx5(void)
-{
-    RTTestISub("Impersonation (as user \"test\")");
+static void tstRTCreateProcEx5(const char *pszUser, const char *pszPassword)
+{
+    RTTestISubF("As user \"%s\" with password \"%s\"", pszUser, pszPassword);
 
     const char * apszArgs[3] =
@@ -152,5 +153,5 @@
     RTPROCESS hProc;
     RTTESTI_CHECK_RC_RETV(RTProcCreateEx(g_szExecName, apszArgs, RTENV_DEFAULT, 0 /*fFlags*/, NULL,
-                                         NULL, NULL, "testcase", "test", &hProc), VINF_SUCCESS);
+                                         NULL, NULL, pszUser, pszPassword, &hProc), VINF_SUCCESS);
     RTPROCSTATUS ProcStatus = { -1, RTPROCEXITREASON_ABEND };
     RTTESTI_CHECK_RC(RTProcWait(hProc, RTPROCWAIT_FLAGS_BLOCK, &ProcStatus), VINF_SUCCESS);
@@ -412,6 +413,13 @@
     if (argc == 2 && !strcmp(argv[1], "--testcase-child-5"))
         return tstRTCreateProcEx5Child(argc, argv);
+    const char *pszAsUser   = NULL;
+    const char *pszPassword = NULL;
     if (argc != 1)
-        return 99;
+    {
+        if (argc != 4 || strcmp(argv[1], "--as-user"))
+            return 99;
+        pszAsUser   = argv[2];
+        pszPassword = argv[4];
+    }
 
     RTTEST hTest;
@@ -431,6 +439,9 @@
     tstRTCreateProcEx3();
     tstRTCreateProcEx4();
-    /** @todo Do not run tstRTCreateProcEx5 on NT4, may not work (?) */
-    tstRTCreateProcEx5();
+    if (pszAsUser)
+    {
+        /** @todo Do not run tstRTCreateProcEx5 on NT4, may not work (?) */
+        tstRTCreateProcEx5(pszAsUser, pszPassword);
+    }
     /** @todo Cover files, ++ */
 
