Discussion Locked

how to create a ms dos boot menu?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

does anyone remenber about batch files?how to make a boot menu?
i tried this but didn't work.

@echo off
:begin
cls
choice in/c:123 pick a nember (1,2, or 3) % 1

if errorlevel=3 goto three
if errorlevel=2 goto two
if errorlevel=1 goto one
goto end

:three
echo you have pressed three
goto end
:two
echo you have pressed two
goto end
:one
echo you have pressed one
: end

does anyone knows where is the fault?

2 replies

by darkhell

as batchfiles work, you need to add params with the errorlevels.. .as in:

if %ERRORLEVEL%=3 goto three
if %ERRORLEVEL%=2 goto two
if %ERRORLEVEL%=1 goto one
goto end

Any other problems I can help you with?

This discussion is closed to new replies.