How do I test for button press on pause command in batch? -


i writing batch script, in user reads disclaimer, press key continue, or "e" exit. looks this:

@echo off echo (some disclaimer text here) echo. echo once understand message, press key continue, or press "e" exit. ::i know pause doesn't take input, i'm using placeholder pause>nul cls echo welcome! pause 

is there way accomplish this? thanks!

to clarify, want exit second press e key. have seen done before, forgot saw it.

choice.exe describe, though doesn't have option "any key". can specify specific key such "y" below.

echo once understand message, press "y" continue, or press "e" exit. choice /c ey if errorlevel 2 goto :welcome if errorlevel 1 goto :canceled  rem user pressed ctrl+c  :canceled rem user pressed e.  cancel stuff. goto :eof  :welcome rem user pressed y.  welcome stuff echo welcome! 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -