user5589479
user5589479

Reputation: 27

Open CMD with specific color and title

I recently started learning batch and wanted to write a script that opens CMD with a specific color and title. This code opens my CMD and another plain one! How can i get rid of the plain cmd?

Start CMD
title Hacker's CMD
color 04

Upvotes: 1

Views: 2729

Answers (1)

woxxom
woxxom

Reputation: 73686

start cmd /k title Hacker's CMD^&color 04

The /k parameter executes the commands and leaves the cmd window open. To pass several commands use an escaped command separator ^& so that the separation occurs in the launched cmd, not in the original batch file.

Upvotes: 3

Related Questions