如何使用输入启动Admin命令提示符然后等待

问题描述 投票:0回答:1

我想要一个.bat文件或类似的东西基本上可以

start/open cmd
input command: cls
hit enter
input command: color f0
hit enter
input command: cls
hit enter
then wait

我是怎么做的 - 但我无法弄清楚如何制作一个文件来完成这件事。有任何想法吗?谢谢。

cmd command-prompt
1个回答
1
投票

这更像是一个超级用户问题。你真的应该发布你试过的代码。此命令将启动带有/ K的cmd shell以使其保留。

START "" cmd.exe /K cls ^& color f0 ^& cls

要以管理员身份运行此命令,请创建cmd.exe的快捷方式,并将Target编辑控件设置为以下字符串。右键单击快捷方式,然后选择“以管理员身份运行”。

C:\Windows\System32\cmd.exe /K cls & color f0 & cls
© www.soinside.com 2019 - 2024. All rights reserved.