--- wine-git/dlls/shell32/tests/shlexec.c	2009-08-03 19:00:16.000000000 +0200
+++ wine-build/dlls/shell32/tests/shlexec.c	2009-08-11 22:47:16.000000000 +0200
@@ -683,6 +683,7 @@
     "%s\\masked",
     "%s\\test file.sde",
     "%s\\test file.exe",
+    "%s\\test file two.exe",
     "%s\\test2.exe",
     NULL
 };
@@ -1167,6 +1168,28 @@
         ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc);
         }
     }
+
+    /* the directory with the test programs contain "test file.exe"
+     * and "test file two.exe". Check we do not start the first
+     * when we specify to start the second (see bug 19666)
+     */
+    sprintf(filename, "%s\\test file.exe", tmpdir);
+    if (!CopyFile("C:\\ShellExecuteClient.exe", filename, FALSE))
+        return;
+    sprintf(filename, "%s\\test file two.exe", tmpdir);
+    if (CopyFile("C:\\ShellExecuteClient.exe", filename, FALSE) &&
+       SetEnvironmentVariable("SHLEXEC_CHILD_FILE",child_file))
+    {
+        rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, "",
+                            NULL);
+        sprintf(filename, "%s\\test file two.exe", tmpdir);
+        ok(rc > 32, "%s returned %d\n", shell_call, rc);
+        okChildInt("argcA", 1);
+        okChildString("argvA0", filename);
+    }
+    else ok(0,"CopyFile(\"%s\",\"%s\",FALSE) or "
+              "SetEnvironmentVariable(\"SHLEXEC_CHILD_FILE\",\"%s\" failed\n",
+              argv0, filename ,child_file);
 }
 
 static void test_exes_long(void)
