This is useful if you need to use different users to run commands, easy to see who you are using at the moment.
WINDOWS TIP SHEET: Personal Prompts
By Jeffery Hicks
I've written about customizing your CMD prompts in the past and here's another idea. What about adding the user name and or computer name to the prompt? With not much work you can your CMD session so that it has a prompt like one of these:
[SAPIEN\JEFF] C:\Windows>
[VISTADESK02] C:\Windows>
To try these out, open a command prompt and type:
Prompt [%userdomain%\%username%] $P$G
This should give you a prompt that looks like my first example. Don't worry -- right now this is only temporary. If you close and reopen your command prompt you'll get the "old" prompt back. To get the second prompt example, use this:
Prompt [%computername%] $P$G
Or, what about adding something like this:
Prompt %computername% $V $P$G
You should get something that looks like this:
VISTADESK01 Microsoft Windows [Version 6.0.6000] C:\Users\Jeff>
These are but a few examples. Take a look at help for the prompt command to see other options.
How do you make this permanent every time you open a command prompt?
First, copy the prompt command to a text file and save it as a batch file. Next, edit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command
Processor. If you don't have a registry key called AutoRun, add it as type REG_SZ and enter the full path and filename to your prompt batch file as its value.
The next time you open a command window, the batch file will run and you'll have a custom and personalized prompt.
Comment: http://mcpmag.com/columns/article.asp?EditorialsID=2418#post
Jeffery Hicks MCSE, MCSA, MCT is a senior network engineer with Visory Group.
Wednesday, December 19, 2007
Personal Prompts
Posted by
Isaac
at
12/19/2007 04:41:00 PM
Labels: Windows Tip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment