且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在批处理脚本中更改暂停命令的输出

更新时间:2023-12-05 11:49:40

您可以使用以下方法隐藏pause命令中的文本:

You could hide the text from the pause command by using this:

pause >nul

然后,您可以回显自己的消息,告诉用户它已暂停:

Then you could echo your own message to tell the user it has paused:

echo The batch file has paused

因此完整的脚本可能看起来像这样:

So the full script might look like this:

@echo off
echo Hello World!
echo The batch file has paused
pause >nul

希望这会有所帮助:)