Change Command prompt

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
 
D

David Sherman

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.
 
A

a nonymous

|
| >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.
 
S

Stan Brown

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".
 
D

David Sherman

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.
 
D

David Sherman

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".
 
D

David Candy

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.
 
A

a nonymous

| 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top