cmd - Batch File toggle menus -
im writing batch file , make toggle menu choices execute instead of common question , answer execution
is there way make list of choices , toggle "run" or "off" them , hit enter start
i found file seemed me in right direction dont know how make work batch file
the code found is...
@echo off set _on=0 :top cls if %_on%==0 (set _nlb= &set _nrb= &set _flb=[&set _frb=]) else (set _nlb= [&set _nrb=]&set _flb= &set _frb= ) echo '_on' flag currently: %_nlb% on %_nrb% %_flb% off %_frb% echo. echo press key toggle '_on' flag pause>nul if %_on%==0 (set _on=1) else (set _on=0) goto top
id
netusers [run] [off] netuseradministrator [run] [off] virus.exe [run] [off] press enter initiate selected.
in type of layout if makes sense
use choice command. example
echo 1] settings echo 2] start echo 3] quit choice /c 123 /n if %errorlevel%==1 goto settings if %errorlevel%==2 goto start if %errorlevel%==3 goto quit
there more parameters timeout , stuff that. @ choice /?
Comments
Post a Comment