cmd msg命令文本大小和颜色

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

我有一个.bat文件在我的shool中运行,警告用户除非报告,否则对设备造成的任何损坏都将受到惩罚。我希望这个msg框中的文本更大,颜色/字体不同。我是怎么做到的?我的msg命令看起来像这样:msg * /time:30 <text here>提前感谢任何答案。

batch-file cmd msgbox
2个回答
3
投票

您可以使用batch / mshta polyglot script创建try.Here是一个示例。使用bat扩展名保存:

<!-- :
@echo off
start "" mshta.exe "%~f0"
exit /b
-->

<html>
<head><title>HTA window</title></head>
<body bgcolor="green"><h1><font size="3" color="red face="verdana">message</h1></font ></body>
<button onclick="myFunction()">OK</button>
<script>
function myFunction() {
    window.close();
}
</script>
</html>

你可以根据需要自定义布局。要在不同的会话中运行它,你将不得不使用runas命令 - https://superuser.com/questions/42537/is-there-any-sudo-command-for-windows


-1
投票

使用MSG命令没有规定。您必须使用自己的程序执行此操作。

© www.soinside.com 2019 - 2024. All rights reserved.