Author: hbelusca
Date: Mon Aug 26 18:35:29 2013
New Revision: 59837

URL: http://svn.reactos.org/svn/reactos?rev=59837&view=rev
Log:
[BOOTDATA]
[CMD]
The default command prompt is $p$g. But still keep the information line by 
setting a system environment variable "PROMPT" set to $i$p$g. Therefore, if you 
are tired of it, either remove the environement variable or redefine it to 
whatever you want. In a current command-line session, to restore the default 
command prompt, enter "prompt" without any other parameter.

Modified:
    trunk/reactos/base/shell/cmd/prompt.c
    trunk/reactos/boot/bootdata/hivesys.inf

Modified: trunk/reactos/base/shell/cmd/prompt.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/prompt.c?rev=59837&r1=59836&r2=59837&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/prompt.c       [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/prompt.c       [iso-8859-1] Mon Aug 26 
18:35:29 2013
@@ -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 @@
     }
 
     /*
-     * 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;
     }

Modified: trunk/reactos/boot/bootdata/hivesys.inf
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?rev=59837&r1=59836&r2=59837&view=diff
==============================================================================
--- trunk/reactos/boot/bootdata/hivesys.inf     [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivesys.inf     [iso-8859-1] Mon Aug 26 
18:35:29 2013
@@ -1211,10 +1211,11 @@
 ; 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


Reply via email to