Blast from the past: setting up a Win98 autoexec.bat

batteriesnotincluded

[H]ard|Gawd
Joined
Jan 9, 2007
Messages
1,195
I'm looking at making a 256mb flash drive into a bootable replacement, but I'm looking at having an option that will not run/install himem.sys so I can copy BIOS files to it, and flash from the USB drive.

I remember when the computer started up, there were 3 options. Boot with CD, Boot without CD, and Help. Well, screw help. I'd rather replace it or add a 4th option to boot without running himem.sys

This is the average Windows 98 Autoexec.bat file on a bootup floppy. What needs to be changed in order for me to do what I want?

Code:
@ECHO OFF
set EXPAND=YES
SET DIRCMD=/O:N
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
cls
call setramd.bat %LglDrv%
set temp=c:\
set tmp=c:\
path=%RAMD%:\;a:\;%CDROM%:\
copy command.com %RAMD%:\ > NUL
set comspec=%RAMD%:\command.com
copy extract.exe %RAMD%:\ > NUL
copy readme.txt %RAMD%:\ > NUL

:ERROR
IF EXIST ebd.cab GOTO EXT
echo Please insert Windows 98 Startup Disk 2
echo.
pause
GOTO ERROR

:EXT
%RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL
echo The diagnostic tools were successfully loaded to drive %RAMD%.
echo.

IF "%config%"=="NOCD" GOTO QUIT
IF "%config%"=="HELP" GOTO HELP
LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM%
echo.
GOTO QUIT

:HELP
cls
call help.bat
echo Your computer will now restart and the startup menu will appear.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
restart.com
GOTO QUIT

:QUIT
echo To get help, type HELP and press ENTER.
echo.
rem clean up environment variables
set CDROM=
set LglDrv=
 
I remember setting up boot menus back in the day for DOS/Windows 3.1,95,98 systems, but I think you used CONFIG.SYS - not AUTOEXEC.BAT

A quick Google gave me http://dos.rsvs.net/DOSPAGE/CONFMENU.HTM but I didn't really check it over too carefully so ymmv

Actually use Windows 98 to create a boot disk, then examine its CONFIG.SYS might be a better idea. Even the Win 98 CD-ROM had such a menu (if I remember correctly) you could examine.
 
A multiboot config.sys I use under a DOS 6.22 VM to select the options I want, in your case you would want himem.sys in the sectioned code instead of at at the top like I have it to be included in all configurations:

Code:
BUFFERS=15,0
FILES=30
DOS=HIGH,UMB
LASTDRIVE=Z
FCBS=4,0
STACKS=9,256
DEVICE=C:\WINDOWS\HIMEM.SYS
SHELL=C:\DOS\COMMAND.COM C:\DOS\  /p

[Menu]
MENUITEM LOAD_ALL,Network and CD
MENUITEM CD_Only,CD and Caching
MENUITEM Network_Only,Network
MENUITEM Bare_Config,Stripped down DOS
MENUITEM Windows,Windows for Workgroups

[LOAD_ALL]
DEVICE=C:\DOS\EMM386.EXE NOEMS
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001
DEVICEHIGH=C:\NET\IFSHLP.SYS
DEVICEHIGH=C:\DOS\SETVER.EXE

[CD_ONLY]
DEVICE=C:\DOS\EMM386.EXE NOEMS
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001
DEVICEHIGH=C:\NET\IFSHLP.SYS
DEVICEHIGH=C:\DOS\SETVER.EXE

[Network_Only]
DEVICE=C:\DOS\EMM386.EXE NOEMS
DEVICEHIGH=C:\NET\IFSHLP.SYS
DEVICEHIGH=C:\DOS\SETVER.EXE

[Bare_Config]
DEVICEHIGH=C:\NET\IFSHLP.SYS
DEVICEHIGH=C:\DOS\SETVER.EXE

[WINDOWS]
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001
DEVICEHIGH=C:\WINDOWS\IFSHLP.SYS
DEVICEHIGH=C:\DOS\SETVER.EXE

The accompanying autoexec.bat:

Code:
@ECHO OFF
Rem [Menu]
Rem MENUITEM LOAD_ALL,Network and CD
Rem MENUITEM CD_Only,CD and Caching
Rem MENUITEM Network_Only,Network
Rem MENUITEM Bare_Config,Stripped down DOS

Rem perform the following commands for all configurations
PROMPT $p$g
PATH C:\NET;C:\DOS
SET TEMP=C:\TEMP

Rem Run the autoexec portion matching the config.sys selection
goto  %config%

:LOAD_ALL
LH C:\NET\net initialize
C:\NET\netbind.com
LH C:\NET\umb.com
LH C:\NET\tcptsr.exe
LH C:\NET\tinyrfc.exe
C:\NET\nmtsr.exe
LH C:\NET\emsbfr.exe
C:\NET\net start
LH c:\dos\mscdex.exe /d:mscd001 /l:d
goto END

:CD_Only
LH c:\dos\mscdex.exe /d:mscd001 /l:d
lh smartdrv /v 2048 128 
goto END

:Network_Only
LH C:\NET\net initialize
C:\NET\netbind.com
LH C:\NET\umb.com
LH C:\NET\tcptsr.exe
LH C:\NET\tinyrfc.exe
C:\NET\nmtsr.exe
LH C:\NET\emsbfr.exe
C:\NET\net start
goto END

:Bare_Config
goto END

:Windows
C:\WINDOWS\net start
@ECHO OFF
PROMPT $p$g
PATH C:\NET;C:\DOS;c:\windows
SET TEMP=C:\TEMP
LH c:\dos\mscdex.exe /d:mscd001 /l:d
win

:end
 
Back
Top