11255Views16Replies
Batch pause command
I was just wondering if there was a way to customize the message in a batch file to say something other then "press any key to continue....." or hiding the message with ">nul" thanks Batchers Unite!!!
I was just wondering if there was a way to customize the message in a batch file to say something other then "press any key to continue....." or hiding the message with ">nul" thanks Batchers Unite!!!
Comments
12 years ago
So what would the command line look like? Choice pause "HAHAHAHHAA this has been paused!!!" ?
Reply 12 years ago
Here is one place....
Reply 12 years ago
what does that have to do with the pause command? i want when i have pause come up, it say a different message that i can customize.
Reply 12 years ago
I believe it halts execution IIRC displaying the message you wish to have displayed.
Reply 12 years ago
Well tahnks everyone for the help, i have found that it is impossible, i have found a new way to display a message. Thanks all! @echo off echo. echo hi echo. pause echo. echo and bye echo. echo Press any key to advance the rest of this file.... pause >nul The above has accomplished my desire for a custom Pause message. test it out!!!
Reply 6 years ago
@ echo Your message here
@ pause>nul
Reply 12 years ago
. You cannot customize the text that PAUSE displays ("what you see is what you get" - Geraldine), but you can with CHOICE.
Reply 12 years ago
does anybody have any examples? i would liek to see it in action plz
Reply 12 years ago
. All you have to do is follow the link that Goodhart provided.
Reply 12 years ago
. Try searching for something like "choice +batch".
Reply 12 years ago
i would like examples plz
6 years ago
this will work..
@ echo Your message here
@ pause>nul
8 years ago
Try this, it's not actually changing the pause message but it looks like it...
echo INSERT MESSAGE HERE
pause > nul
This will display:
INSERT MESSAGE HERE
Until you press a key that is what it will display
9 years ago
what a bunch of ignorant people! CHOICE doesn't work on WinXP (or earlier NT-based OSes). and you could've at least posted what CHOICE DOES, and how to use it (the link wasn't very descriptive, and didn't reference how to use it the way the OP was wanting to.
in order to run the script on ANY PC, you would need to use something like:
2>nul (pause|set /p
or
2>nul (pause|echo+Your message)
if you would prefer the cursor blinking on the next line...
of course, this works best if you preface it with a good old @echo OFF, but both will work either way.
12 years ago
As Nacho says, the "Choice" cmd will stop the execution until a displayed Choice is made.
12 years ago
. CHOICE?