Computing.Net > Forums > Disk Operating System > DOS Menu, Batch File

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS Menu, Batch File

Reply to Message Icon

Name: antonp
Date: July 12, 2008 at 13:48:13 Pacific
OS: DOS
CPU/Ram: 2048
Product: IBM
Comment:

I have a batch file that creates a DOS menu where i can make a selection to do certain tasks for me from DOS. The menu boots fine, but i'm unable to make any selections....
I have copied the choice.com and choice.exe files to my shared folder.
Not 100% sure where these files should be and how i should call them for me to be able to make selections.

Here is my menu.bat file:

=======Begin=======
@ECHO OFF

:BEGIN
call simulate.bat
call pass.bat
goto begin
CLS
ECHO.
ECHO DOS UTILITIES MENU-PLEASE MAKE A CHOICE
ECHO.
ECHO.
ECHO 1=Remove All Hard Drive Partitions
ECHO 2=FDISK Hard Drive
ECHO 3=Format Hard Drive
ECHO 4=Dell Utilities
ECHO 5=Re-image
ECHO 6=Exit To DOS
ECHO.
ECHO To bring this menu back type GO.BAT at the dos prompt.
ECHO.
CHOICE /C:123456

pause

rem PICK A NUMBER (1, 2, 3, 4, 5, OR 6)%1
ECHO.
If ERRORLEVEL ==6 GOTO SIX
If ERRORLEVEL ==5 GOTO FIVE
If ERRORLEVEL ==4 GOTO FOUR
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END

:SIX
EXIT
GOTO QUIT

:FIVE
call re-image.bat
GOTO END

:FOUR
call dell.bat
GOTO END

:THREE
cd dos
call format.bat
GOTO END

:TWO
cd dos
call fdisk.bat
GOTO END

:ONE
cd dos
call blast.bat
GOTO END

:END
cd\
REM ECHO Completed. Bringing up DOS menu again...
REM pause
REM f:go.bat

:QUIT
f:

======End=======



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 12, 2008 at 16:19:51 Pacific
Reply:

[1] What DOS?

[2] Have you tested either CHOICE.COM oe .EXE? The one you wil use needs to be in the path.


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: cup
Date: July 18, 2008 at 11:31:36 Pacific
Reply:

You could use goto LAB%ERRORLEVEL%
And label them LAB6, LAB5 etc.


0

Response Number 3
Name: Kevin Goodman
Date: September 11, 2008 at 01:03:46 Pacific
Reply:

The biggest problem I see is:

:BEGIN
call simulate.bat
call pass.bat
goto begin

I have no clue what is in those other batch files but I don't see any possible exit point after the 'goto begin' hence in my opinion your problem is that your menu program is stuck in an infinite loop hence calling simulate.bat and pass.bat over and over again instead of continuing down the batch file and generating your menu.

i may be wrong but if im not, i hope this helps.

I am zoog.


0

Response Number 4
Name: Mechanix2Go
Date: September 11, 2008 at 02:32:43 Pacific
Reply:

I guess since it waited for 2 months, it wasn't urgent. LOL


=====================================
If at first you don't succeed, you're about average.

M2


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: DOS Menu, Batch File

Color Dos Command Batch file www.computing.net/answers/dos/color-dos-command-batch-file/11335.html

DOS BACKUP BATCH FILE. www.computing.net/answers/dos/dos-backup-batch-file/7196.html

copying in dos with batch file www.computing.net/answers/dos/copying-in-dos-with-batch-file/15285.html