+ DWORD dwError;
+ LPWSTR p = NULL;
+
+
+ /*
+ * Initialize the UtilityProgramDirectory variable.
+ */
+ GetModuleFileNameW(NULL, UtilityProgramDirectory, COUNT_OF(UtilityProgramDirectory));
+ dwError = GetLastError();
+ ok(dwError == ERROR_SUCCESS, "ERROR: Cannot retrieve the path to the current running process, last error %lu\n", dwError);
+ if (dwError != ERROR_SUCCESS) return;
+
+ /* Path : executable.exe or "executable.exe" or C:\path\executable.exe or "C:\path\executable.exe" */
+ p = wcsrchr(UtilityProgramDirectory, L'\\');
+ if (p && *p != 0)
+ *++p = 0; /* Null-terminate there : C:\path\ or "C:\path\ */
+ else
+ UtilityProgramDirectory[0] = 0; /* Suppress the executable.exe name */
+
+ wcscat(UtilityProgramDirectory, L"data\\CmdLineUtil.exe");
+
+ /* Close the opened quote if needed, and add a separating space */
+ if (UtilityProgramDirectory[0] == L'"') wcscat(UtilityProgramDirectory, L"\"");
+
+
+ /*
+ * Now launch the tests.
+ */