This was a big problem back in the days - you needed to have multiple copies of AUTOEXEC.BAT and CONFIG.SYS for various games or programs because of the limitation of the 640K memory barrier. MS-DOS 6 and higher addressed this issue with the multi-config option. You could have multiple configurations in the same CONFIG.SYS and AUTOEXEC.BAT that you could select from at bootup from a menu.
For this example we will have 3 configs. One with CD-ROM and Sound drivers, Sound drivers no CD-ROM and Syquest EZ-Drive. (Syquest was like a ZIP drive that connected to Parallel port with 135MB cartridges).
Whaever you put at the beginning of your CONFIG.SYS and AUTOEXEC.BAT get executed all the time but items in the menu option only get executed when you select them.
CONFIG.SYS:
device=himem.sys /TESTMEM:OFF
device=emm386.exe noems
dos=high,umb
files=60
buffers=60
[menu]
menuitem=cdsound, Load CD-ROM Drivers and Sound Blaster
menuitem=sound, Sound Blaster no CD-ROM drivers
menuitem=syquest, Load Syquest drivers only
menuitem=none, DOS Prompt
[cdsound]
REM Sound Blaster driver
DEVICE=CTSB16.SYS /UNIT=0 /WIN95 /BLASTER=A:220 I:5 D:1 H:7
REM Oak Generic CD-ROM driver
device=oakcdrom.sys /d:cdrom
REM Smart Drive Cache for CD-ROM (optional, recommended)
DEVICE=\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER
[sound]
REM Sound Blaster driver
DEVICE=CTSB16.SYS /UNIT=0 /WIN95 /BLASTER=A:220 I:5 D:1 H:7
[syquest]
DEVICEhigh=EZDRIVE\SQATDRVR.SYS /A:2 /P
devicehigh=EZDRIVE\epatsyq.sys
[none]
AUTOEXEC.BAT:
@echo off
prompt $P$G
if %CONFIG%==cdsound goto cdsb
if %CONFIG%==sound goto sb
goto common
:cdsb
SET BLASTER=A220 I5 D1 H7 P330 T6
mscdex /D:cdrom /M:10
:sb
SET BLASTER=A220 I5 D1 H7 P330 T6
:common
------------------------------------------------------------------------------------
Anything at the top of config and autoexec that appears before the [menu] heading loads all the time but whatever is under the headings only get loaded when you make select the menu option for that group. Autoexec.bat can read the selections you made in config.sys and load a separate section. This is just an example but it should be enough to get you started.