Change Command prompt

  • Thread starter Thread starter David Sherman
  • Start date Start date
D

David Sherman

Under Windows XP, service pack 2, I want to change command promt.
to include computername and drive and path.

The key starts at
HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
Since I have no PROMPT, I right click on Environment, New key, type in
PROMPT, Go to the Right Pane, and add [%COMPTERNAME%]$S$T$P$G.

I reboot the name and nothing happens.

What is wrong?

thanks
 
Later,

I change the right click on environment new key to right click on
environment and then String Value, Prompt etc and now all but
%computername% works.
 
|
| >Under Windows XP, service pack 2, I want to change command promt.
| >to include computername and drive and path.
| >
| >The key starts at
| >HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Control\Session
| >Manager\Environment
| >Since I have no PROMPT, I right click on Environment, New key, type in
| >PROMPT, Go to the Right Pane, and add [%COMPTERNAME%]$S$T$P$G.
| >
| >I reboot the name and nothing happens.
| >
| >What is wrong?
| >
| >thanks
|
| I change the right click on environment new key to right click on
| environment and then String Value, Prompt etc and now all but
| %computername% works.


Start
Run
HH.exe "ntcmds.chm::/ntcmds.htm"
Enter
Prompt

.... does not mention %COMPTERNAME% as an option.
 
Under Windows XP, service pack 2, I want to change command promt.
to include computername and drive and path.

The key starts at
HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
Since I have no PROMPT, I right click on Environment, New key, type in
PROMPT, Go to the Right Pane, and add [%COMPTERNAME%]$S$T$P$G.

There's a U in "computername".
 
Thanks for the tip.

Under prompt - optional items included in [brackets] can be used.

So my job is determine of %computername% is an optional item.
 
Thanks for the correction.

Even when I add the U, it sttill doesn't work.


Under Windows XP, service pack 2, I want to change command promt.
to include computername and drive and path.

The key starts at
HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
Since I have no PROMPT, I right click on Environment, New key, type in
PROMPT, Go to the Right Pane, and add [%COMPTERNAME%]$S$T$P$G.

There's a U in "computername".
 
SERENITY C:\Documents and Settings\David Candy>set prompt=%computername% %prompt
%

as a startup bat.

--
----------------------------------------------------------
http://www.uscricket.com
David Sherman said:
Thanks for the tip.

Under prompt - optional items included in [brackets] can be used.

So my job is determine of %computername% is an optional item.



|
| >Under Windows XP, service pack 2, I want to change command promt.
| >to include computername and drive and path.
| >
| >The key starts at
| >HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Control\Session
| >Manager\Environment
| >Since I have no PROMPT, I right click on Environment, New key, type in
| >PROMPT, Go to the Right Pane, and add [%COMPTERNAME%]$S$T$P$G.
| >
| >I reboot the name and nothing happens.
| >
| >What is wrong?
| >
| >thanks
|
| I change the right click on environment new key to right click on
| environment and then String Value, Prompt etc and now all but
| %computername% works.


Start
Run
HH.exe "ntcmds.chm::/ntcmds.htm"
Enter
Prompt

... does not mention %COMPTERNAME% as an option.
 
| Thanks for the tip.
|
| Under prompt - optional items included in [brackets] can be used.
|
| So my job is determine of %computername% is an optional item.


No.

<quote>
Formatting legend
Format Meaning
Between brackets ([]) Optional items
</quote>

.... relates to ...

<quote>
Syntax
prompt [text]
</quote>

.... which means that any text after "prompt" is optional.

For example, both of the following commands are valid:

PROMPT
PROMPT [%computername%] $T $P$G


One way to set Environment Variables is:

Control Panel
System
Advanced
Environment Variables

"User variables for <-user->" -or- "System variables"
Variable Value
PROMPT [%computername%] $t $p$g


| >| >Under Windows XP, service pack 2, I want to change command promt.
| >| >to include computername and drive and path.
| >| >The key starts at
| >| >HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Control\Session
| >| >Manager\Environment
| >| >Since I have no PROMPT, I right click on Environment, New key, type in
| >| >PROMPT, Go to the Right Pane, and add [%COMPTERNAME%]$S$T$P$G.
| >| >I reboot the name and nothing happens.
| >| >What is wrong?
| >| >thanks
| >|
| >| I change the right click on environment new key to right click on
| >| environment and then String Value, Prompt etc and now all but
| >| %computername% works.

:
| >Start
| > Run
| >HH.exe "ntcmds.chm::/ntcmds.htm"
| > Enter
| > Prompt
| >... does not mention %COMPTERNAME% as an option.
 
Back
Top