Commit 5ac2238a authored by Alexandre Julliard's avatar Alexandre Julliard

wcmd: Try executing the process even if the exe file doesn't exist.

It may be a builtin exe in which case the CreateProcess call will succeed.
parent d404fb5b
......@@ -594,11 +594,11 @@ char filetorun[MAX_PATH];
/* No batch file found, assume executable */
hinst = FindExecutable (param1, NULL, filetorun);
if ((int)hinst < 32) {
WCMD_print_error ();
return;
}
if ((int)hinst < 32)
console = 0;
else
console = SHGetFileInfo (filetorun, 0, &psfi, sizeof(psfi), SHGFI_EXETYPE);
ZeroMemory (&st, sizeof(STARTUPINFO));
st.cb = sizeof(STARTUPINFO);
init_msvcrt_io_block(&st);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment