問題描述
打開具有特定顏色和標題的 CMD (Open CMD with specific color and title)
我最近開始學習批處理,想寫一個腳本,用特定的顏色和標題打開 CMD。這段代碼打開了我的 CMD 和另一個普通的 CMD!我怎樣才能擺脫普通的 cmd?
Start CMD
title Hacker's CMD
color 04
參考解法
方法 1:
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.
(by user5589479、wOxxOm)