From a49c07b8f2bbd81fa9af1cdbcfb4ffd443ade3be Mon Sep 17 00:00:00 2001 From: Phillip Susi Date: Mon, 18 Jun 2001 03:02:43 +0000 Subject: [PATCH] Fixed CreateProcess() to use the command line parameter like NT does This still needs quite a bit more work to fix bugs and be 100% compatible with NT svn path=/trunk/; revision=1983 --- reactos/lib/kernel32/process/create.c | 4 ++-- reactos/subsys/system/shell/shell.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/reactos/lib/kernel32/process/create.c b/reactos/lib/kernel32/process/create.c index b84ee8333ba..6f41ea0a4b1 100644 --- a/reactos/lib/kernel32/process/create.c +++ b/reactos/lib/kernel32/process/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.38 2001/03/17 11:11:10 dwelch Exp $ +/* $Id: create.c,v 1.39 2001/06/18 03:02:43 phreak Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -454,7 +454,7 @@ CreateProcessW(LPCWSTR lpApplicationName, * Create the PPB */ - RtlInitUnicodeString(&CommandLine_U, TempCommandLine); + RtlInitUnicodeString(&CommandLine_U, lpCommandLine); DPRINT("CommandLine_U %S\n", CommandLine_U.Buffer); diff --git a/reactos/subsys/system/shell/shell.c b/reactos/subsys/system/shell/shell.c index 6b6cce6f9a5..764e09323d7 100644 --- a/reactos/subsys/system/shell/shell.c +++ b/reactos/subsys/system/shell/shell.c @@ -1,4 +1,4 @@ -/* $Id: shell.c,v 1.5 2001/05/01 23:08:17 chorns Exp $ +/* $Id: shell.c,v 1.6 2001/06/18 03:02:43 phreak Exp $ * * PROJECT : ReactOS Operating System * DESCRIPTION: ReactOS' Native Shell @@ -155,8 +155,10 @@ int ExecuteProcess(char* name, char* cmdline, BOOL detached) memset(&StartupInfo, 0, sizeof(StartupInfo)); StartupInfo.cb = sizeof (STARTUPINFO); StartupInfo.lpTitle = name; + if( cmdline && *cmdline ) + *(cmdline-1) = ' '; // fix command line so it is the FULL command, including exe name ret = CreateProcessA(fullname, - cmdline, + name, NULL, NULL, FALSE,