11016Views16Replies

Author Options:

Batch pause command Answered

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!!!

Discussions

0
None
spiker

10 years ago

So what would the command line look like? Choice pause "HAHAHAHHAA this has been paused!!!" ?

0
None
spikerGoodhart

Reply 10 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.

0
None
Goodhartspiker

Reply 10 years ago

I believe it halts execution IIRC displaying the message you wish to have displayed.

0
None
spikerGoodhart

Reply 10 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!!!

0
None
MOHD KamranSspiker

Reply 3 years ago

@ echo Your message here

@ pause>nul

try it
0
None
NachoMahmaspiker

Reply 10 years ago

. You cannot customize the text that PAUSE displays ("what you see is what you get" - Geraldine), but you can with CHOICE.

0
None
spikerNachoMahma

Reply 10 years ago

does anybody have any examples? i would liek to see it in action plz

0
None
NachoMahmaspiker

Reply 10 years ago

. All you have to do is follow the link that Goodhart provided.

0
None
NachoMahmaspiker

Reply 10 years ago

. Try searching for something like "choice +batch".

0
None
MOHD KamranS

3 years ago

this will work..

@ echo Your message here

@ pause>nul

0
None
Prof. Pickle

6 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

0
None
darkflux

7 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.

0
None
Goodhart

10 years ago

As Nacho says, the "Choice" cmd will stop the execution until a displayed Choice is made.