Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to write a Windows O.S. install batch. I want the install batch to allow me a choice before proceeding to the next step. I have added the batch to a Win98 Boot Floppy. The install batch is set to be called from within the autoexec.bat of the Win98 Boot Floppy. Thus far, when trying to use the batch, it allows me no choices. It goes directly into installing Win98 etc.. When testing the batch, if I do not have an Install Cd in the Cd-rom Drive, the batch goes directly to the Win98 section, then to the WinXP section and then to the Exit Section. What corrections do I need to make that will allow me a menu and/or choice?
NOTE: I have tried using a Win98.bat, WinXP.bat and an Exit.bat each being called from within the choice section of the install bat.., each has the same results as stated above.
Below is a copy of part of my batch file. Due to the length of my post, I left out the WinXP and Exit section of the install.bat.
{hopefully the website HTML will not change the text output of my batch}@echo off
:start
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Main Menu º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º 1. INSTALL WIN98 S.E. º
echo º 2. INSTALL WINXP PRO º
echo º 3. QUIT PROGRAM º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼCHOICE /C:123
if errorlevel 3 GOTO QUIT PROGRAM
if errorlevel 2 GOTO INSTALL WINXP PRO
if errorlevel 1 GOTO INSTALL WIN98 S.E.:INSTALL WIN98 S.E.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º GETTING READY TO INSTALL WIN98 S.E. º
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Making WIN98 Directory on Hard Drive for the Win98 Cabs º
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
C:
md c:\win98
copy a:\msbatch.inf c:\win98
echo.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Copying the Win98 Cabs From Cd-Rom to the Hard Drive º
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
R:
copy *.* c:\win98
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º All Files and Win98 Cabs have been copied to the Hard Drive º
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Preparing to install Win98 º
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
C:\WIN98\SETUP.exe /ie /im /is

Hi
Try changing to
I think the the extra words are being ignored and the goto just go's the the first
one.
if errorlevel 3 GOTO QUIT PROGRAM
if errorlevel 2 GOTO WINXP PRO INSTALL
if errorlevel 1 GOTO WIN98 S.E. INSTALL

Below is a copy of my edits to the Batch Menu. However, I am still receiving the same results. When running the batch from within the Win98 Boot Floppy, everything goes to auto and starts to install Win98., thus it does not wait for a choice.
@echo off
echo 1 WIN98
echo 2 WINXP
echo 3 QUIT
echo.
echo.
CHOICE /C:123
if errorlevel 3 goto QUIT
if errorlevel 2 goto WINXP
if errorlevel 1 goto WIN98
:WIN98

Well, you've got it stripped down to the essentials.
Either the CHOICE is not setting the errorlevel [seems unlikely] or the GOTO section doesn't work.
I'm stumped.
Since you're using DOS, try prefixing the label names with colons:
if errorlevel 3 goto :QUIT
if errorlevel 2 goto :WINXP
if errorlevel 1 goto :WIN98===
If at first you don't succeed, you're about average.M2

Thanks, for the suggestions. I have tried everything as suggested, however nothing seems to correct the problem. Any suggestions as to a good DOS Menu Program?
J.C.

Hi J.C.
I'm out of ammo on this one.
I can't reboot in DOS right now, but this BAT is a case of "so simple it can't not work".
Keep us posted.
If at first you don't succeed, you're about average.M2

Hi Mechanix2Go,
I do not understand the problem. As you stated, it is a simple Bat. I just tried it on another H.D. with the same none Choice results.
J.C.

Perhaps it would be an idea to boot from the floppy and then just try the Choice command at the prompt and see if it works.. (Remove the 98 installation from autoexe for now). If i remember correctly, choice is a "choice.com" file. Maybe its not included on the boot floppy?

I found the problem.
The "CHOICE.COM", was corrupt. I added a new "CHOICE.EXE & CHOICE.COM", to the Floppy. Everything works fine.Thanks, for trying to help me sort out the problem.
J.C.

J.C.
Good deal; thanks for letting us know.
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

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