打開具有特定顏色和標題的 CMD (Open CMD with specific color and title)


問題描述

打開具有特定顏色和標題的 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 user5589479wOxxOm)

參考文件

  1. Open CMD with specific color and title (CC BY‑SA 2.5/3.0/4.0)

#scripting #prompt #Command #batch-file






相關問題

等待進程完成 (Wait for a process to finish)

如何使用 Inno Setup 根據註冊表項選擇在文件夾中安裝插件/文件? (How do I use Inno Setup to optionally install a plugin/file in a folder based on a registry entry?)

Python:遍歷列表但重複一些項目 (Python: Loop through list but repeat some of the items)

Skrip Perl untuk memeriksa server jarak jauh untuk proses (Perl script to check remote server for process)

持續集成中的數據庫變更管理 (Database change management in continuous integration)

如何確定html標籤是否跨多行 (How to determine if an html tag splits across multiple lines)

打開具有特定顏色和標題的 CMD (Open CMD with specific color and title)

用於搜索 XML 文檔的表單 (Form to search XML document)

反編譯 Lua 字節碼的最佳工具? (Best tool(s) for decompiling Lua bytecode?)

如何在 Blender 中通過矩陣反轉變換? (How to reverse a transformation by matrix in Blender?)

在命令行(終端)上使用 R 腳本的最佳方式是什麼? (What's the best way to use R scripts on the command line (terminal)?)

Google Sheets Script,如何創建工作表標籤的新鬆散對象 (Google Sheets Script, how to create a NEW loose object of a sheet tab)







留言討論