Commit in reactos/lib/kernel32/process on MAIN
create.c+7-41.83 -> 1.84
- Fixed the execution of batch files.

reactos/lib/kernel32/process
create.c 1.83 -> 1.84
diff -u -r1.83 -r1.84
--- create.c	11 May 2004 20:44:29 -0000	1.83
+++ create.c	15 May 2004 19:24:59 -0000	1.84
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.83 2004/05/11 20:44:29 gvg Exp $
+/* $Id: create.c,v 1.84 2004/05/15 19:24:59 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -861,6 +861,7 @@
    BOOL InputDup, OutputDup, ErrorDup;
    WCHAR Name[MAX_PATH];
    WCHAR *TidyCmdLine;
+   BOOL IsBatchFile = FALSE;
 
    DPRINT("CreateProcessW(lpApplicationName '%S', lpCommandLine '%S')\n",
 	   lpApplicationName, lpCommandLine);
@@ -939,6 +940,7 @@
    if (e != NULL && (!_wcsicmp(e, L".bat") || !_wcsicmp(e, L".cmd")))
    {
        // the command is a batch file
+       IsBatchFile = TRUE;
        if (lpApplicationName != NULL && lpApplicationName[0])
        {
 	  // FIXME: use COMSPEC for the command interpreter
@@ -978,10 +980,11 @@
     * Process the application name and command line
     */
    RtlInitUnicodeString(&ImagePathName_U, ImagePathName);
-   RtlInitUnicodeString(&CommandLine_U, TidyCmdLine);
+   RtlInitUnicodeString(&CommandLine_U, IsBatchFile ? lpCommandLine : TidyCmdLine);
 
-   DPRINT("ImagePathName_U %S\n", ImagePathName_U.Buffer);
-   DPRINT("CommandLine_U %S\n", CommandLine_U.Buffer);
+   DPRINT("ImagePathName_U '%S'\n", ImagePathName_U.Buffer);
+   DPRINT("lpCommandLine '%S'\n", lpCommandLine);
+   DPRINT("TidyCmdLine '%S'\n", TidyCmdLine);
 
    /* Initialize the current directory string */
    if (lpCurrentDirectory != NULL)
CVSspam 0.2.8