How can I configure my command prompt to display the machine name?

If you connect to multiple computers (e.g., by Telnet), you can configure the command prompt to display the name of the computer you’re connected to. The best way to do this is to configure the command processor to automatically run a prompt command at startup to evaluate the %computername% environment variable. To configure the prompt, perform the following steps:

Start a registry editor (e.g., regedit.exe).
Navigate to the HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommand Processor registry subkey (to configure the prompt for everyone) or to the HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor registry subkey (to configure the prompt only for the current user).
From the Edit menu, select New, String Value.
Enter a name of AutoRun, then press Enter.
Double-click the new value, set it to “prompt [%computername%]$S$P$G” (don’t type the quotes), then press Enter.
Close the registry editor.

Leave a Reply

Your email address will not be published. Required fields are marked *