Yes MS-DOS menu is in autoexec.bat
and config.sys
. These two files are use by MS-DOS startup. The config.sys
is for loading drivers and autoexec.bat
is used to set prompt, variables, TSRs and run desired apps.
So up to w9x it can be also used to select OS as the Windows was just an executable on top of MS-DOS. So you add menu entry in config.sys
with drivers needed (windows has its own drivers but IIRC it needed himem.sys
before running win.exe
)
Here are mine:
Autoexec.bat
@echo off
PROMPT $P$G
PATH e:\rescue;e:\rescue\dos98;e:\rescue\vcnew;e:\rescue\pack;e:\rescue\views
e:
cd rescue
SET TEMP=e:\rescue\temp
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET SOUND=e:\rescue\SB16
SET MIDI=SYNTH:1 MAP:E MODE:0
e:\rescue\SB16\DIAGNOSE /S
e:\rescue\SB16\AWEUTIL /S
e:\rescue\SB16\MIXERSET /P /Q
goto %config%
:a
:b
:c
:d
:e
lh gmouse
LH vc
Config.sys
;devicehigh=e:\rescue\dos98\interlnk.exe
shell e:\rescue\dos98\command.com e:\rescue\dos98 /P
lastdrive=M
files=50
buffers=8
stacks=0,0
DOS=HIGH,UMB
[menu]
menuitem=a,QEMM
menuitem=b,EMM EMS
menuitem=c,EMM NOEMS
menuitem=d,STANDART
menuitem=e,RAMDISK 32MB
menudefault=d,1
[a]
device=e:\rescue\dos98\qemm386.sys RAM BE:N
[b]
device=e:\rescue\dos98\himem.sys
devicehigh=e:\rescue\dos98\emm386.exe rammax
[c]
device=e:\rescue\dos98\himem.sys
devicehigh=e:\rescue\dos98\emm386.exe noems
[d]
device=e:\rescue\dos98\himem.sys
[e]
device=e:\rescue\dos98\himem.sys
devicehigh=e:\rescue\dos98\ramdrive.sys 32767 /e
taken from: SO/SE: Run Turbo C++ in Freedos where you can find also tips on how to run MS-DOS on newer machines. Beware that from W95 the MS-DOS is not fully compatible with the old MS-DOS 6.22 so some games and apps will not work properly or at all. The other answers here cover the MS-DOS menu well enough so I see no point in describing the obvious mechanism...
From NT,W2K and XP there was no more MS-DOS just console so for those you need to use boot.ini
like this:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /usepmtimer
Each line in the [operating systems]
represents one OS to boot from. You also need separate partition per OS so have MS-DOS on separate partition (or floppy) there are also utilities like Lilo boot that can handle multi OS. IIRC the boot.ini
could be edited from msconfig.exe
.
The above example is from XP. The Vista,W7 and latter do not use boot.ini
anymore instead they have some kind of boot app (like Lilo boot).
The menu is usually created during Windows installation (as the installer detects OS in the PC) but nowadays HW has usually boot menu directly in BIOS of the MB.
In the past I usually got MS-DOS 6.22 + W9X + W2K on single machine as I got plenty of apps running only in those specific OS that I was not able to part with...
PS.
At one time I even got 5.25" DD Floppy with MS-DOS 6.22 system files (and all the rest was on HDD hence the weird e:\rescue\
path as the floppy did not have enough space. That solution was great as even command.com
was on the HDD so no speed problems due to booting from floppy. That is what
shell e:\rescue\dos98\command.com e:\rescue\dos98 /P
does in the config.sys
of mine ... And the E:
was just logical drive instead of separate partition ...
In case you are going for MS-DOS you should see:
on how to deal with runtime error 200 and for list of apps you should have in your OS (with link to archive where many of them are still available).
boot.ini
youre probably right so I converted the comment into answer.