看看有没有 choice 命令?
或者这样:- @echo off&setlocal enabledelayedexpansion
- set input=y
- %1 goto input
- (del input.txt
- for /l %%a in (10 -1 1) do (
- if not exist input.txt ping /n 2 127.1&title 倒数%%a秒<nul>con
- )
- if exist input.txt (title ) else taskkill /f /fi "windowtitle eq 管理员: input*" /im cmd.exe&set input>con
- pause&exit
- )>nul 2>nul
-
- :input
- start /b "" %0 :
- title input
- set /p input=Input:
- echo !input!>input.txt
- set input
- pause>nul
复制代码
|