Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to write a batch script which configures this list of commands:

  1. Put the name of the window "Cmd configuration"
  2. Put the color of the text in green.
  3. Put the prompt character "$"
  4. Show the message "Cmd is configured"
  5. Ends by keeping the window open..

This is what I already have:

@echo off  
title cmd configuration  
color a  
prompt $  
@echo off  
Echo cmd is configured
share|improve this question
I've reopened this but you might want to add an actual question here. Doesn't the script work for you? – slhck Jan 23 '13 at 22:10

This will do all that you asked.

@echo off
cmd /k "title Cmd configuration& color A & prompt $$ & echo Cmd is configured"


Cmd is configured


This next one removes that blank line between the prompt and message.

@echo off
cmd /k "title Cmd configuration& color A & prompt $$ & <nul set /p =Cmd is configured"


Cmd is configured
share|improve this answer

You want to write a batch script (.BAT) that executes the list of commands. The name of the window can be anything, just use the form TITLE [title here]. The command to make the text green is in fact COLOR A, and the prompt character can be changed by using PROMPT $. Saying "Show the message" is a little vague, because you might want to have a message box pop up, or you might want to have it show in the command prompt. ECHO does print these characters, but unfortunately, it cannot keep the window open. However, you can pause the exit by using PAUSE. Therefore, your script should be as follows:

TITLE Cmd configuration.
ECHO\ Cmd is configured.

Note that you can test a batch script by double-clicking on it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .