From: Francois Gouget Subject: shell32/tests: Fix a ShellExecute() race condition. Message-Id: Date: Mon, 8 Feb 2016 05:24:45 +0100 (CET) On Windows XP SP1 a ShellExecute() call that is supposed to fail succeeds instead. This means the child process is started but ShellExecute() returns without waiting for it, resulting in a race condition on the child's results file. So use our shell_execute_ex() wrapper instead as it always waits for the child process. Signed-off-by: Francois Gouget --- dlls/shell32/tests/shlexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 9d57ca9..259ba06 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1844,7 +1844,8 @@ static void test_fileurls(void) return; } - rc = (INT_PTR)ShellExecuteA(NULL, NULL, "file:///nosuchfile.shlexec", NULL, NULL, SW_SHOWNORMAL); + rc = shell_execute_ex(SEE_MASK_FLAG_NO_UI, NULL, + "file:///nosuchfile.shlexec", NULL, NULL, NULL); if (rc > 32) { win_skip("shell32 is too old (likely < 4.72). Skipping the file URL tests\n"); -- 2.7.0