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.
This commit is contained in:
Alexandre Julliard 2006-03-21 12:00:17 +01:00
parent d404fb5bf8
commit 5ac2238ad0
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}
console = SHGetFileInfo (filetorun, 0, &psfi, sizeof(psfi), SHGFI_EXETYPE);
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);