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

Alexandre Julliard julliard at wine.codeweavers.com
Tue Mar 21 13:21:11 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 5ac2238ad074d652c70da4691c1028f264592888
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=5ac2238ad074d652c70da4691c1028f264592888

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Mar 21 12:00:17 2006 +0100

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.

---

 programs/wcmd/wcmdmain.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/programs/wcmd/wcmdmain.c b/programs/wcmd/wcmdmain.c
index 6bc9272..db092b5 100644
--- a/programs/wcmd/wcmdmain.c
+++ b/programs/wcmd/wcmdmain.c
@@ -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);




More information about the wine-cvs mailing list