我该如何开始的cmd.exe / K的多个命令? [英] How do I start cmd.exe /k with multiple commands?
问题描述
为什么不以下code改变颜色和标题的 CMD2 ?怎么了,怎么办?在命令变色的 CMD1 ,并设置在标题的 CMD2
启动CMD.EXE / K职称考试和放大器;彩色02安培;模式CON:COLS = 160线= 78
启动TEST的cmd.exe / K职称考试和放大器;彩色02安培;模式CON:COLS = 160行= 78
如果不引用新的 CMD
实例必须执行命令,在&安培;
是间preTED作为后命令串联启动
键,所以它在一审执行。加上引号,这是命令的一部分在第二 CMD
实例执行。
此外,由于启动
命令首先看到的报价参数作为窗口开始的瓷砖,和我们将要使用引号,这是必要的,包括一个标题中的命令(或,
无标题)。
Why doesn't the following code change the color and the title on cmd2? How, and what to do? The command changes color on cmd1, and sets the title on cmd2?
start cmd.exe /k TITLE TEST & color 02 & mode con: cols=160 lines=78
start "TEST" cmd.exe /k "TITLE TEST & color 02 & mode con: cols=160 lines=78"
Without quoting the command that the new cmd
instance must execute, the &
is interpreted as a command concatenation after the start
and so it is executed in the first instance. With quotes, it is part of the command to execute in the second cmd
instance.
Also, as the start
command sees the first quoted argument as the tile of the window to start, and we are going to use quotes, it is necessary to include a title in the command (or ""
for no title).
这篇关于我该如何开始的cmd.exe / K的多个命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!