diff --git a/reactos/base/shell/cmd/prompt.c b/reactos/base/shell/cmd/prompt.c index da6ea9ddaa0..2898a03ce2d 100644 --- a/reactos/base/shell/cmd/prompt.c +++ b/reactos/base/shell/cmd/prompt.c @@ -52,7 +52,7 @@ static TCHAR InfoLine[] = _T(" ReactOS Command Prompt Type HELP = Help "); /* The default prompt */ -static TCHAR DefaultPrompt[] = _T("$I$P$G"); +static TCHAR DefaultPrompt[] = _T("$P$G"); /* @@ -256,18 +256,13 @@ INT cmd_prompt(LPTSTR param) } /* - * If 'param' is NULL, then we need to set it to default, - * because that means the user entered "prompt" only. - * So even if 'param' is null you _must_ still set prompt - * to the default. There seems to be some kind of difference - * between winxp and 2k in this matter and this way will - * cover both. Do not use fixed size of 'szParam' for 'param'; - * the buffers are 8192 bytes and will later change to dynamic buffer. + * Set the PROMPT environment variable. If 'param' is NULL or is + * an empty string (the user entered "prompt" only), then remove + * the environment variable and therefore use the default prompt. + * Otherwise, use the new prompt. */ - - /* Set the PROMPT environment variable */ if (!SetEnvironmentVariable(_T("PROMPT"), - (param[0] != _T('\0') ? param : DefaultPrompt))) + (param && param[0] != _T('\0') ? param : NULL))) { return 1; } diff --git a/reactos/boot/bootdata/hivesys.inf b/reactos/boot/bootdata/hivesys.inf index 751e1df160f..1b7e10d9673 100644 --- a/reactos/boot/bootdata/hivesys.inf +++ b/reactos/boot/bootdata/hivesys.inf @@ -1211,10 +1211,11 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","UNC",0x0000 ; System environment settings HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PROMPT",0x00000000,"$I$P$G" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" ; Known DLLs