Chapter 2 (c2) - Sample AUTOEXEC.BAT File.  

The following sample AUTOEXEC.BAT file is designed to work with the sample CONFIG.SYS file in the 
preceding section. 
  
@echo off
loadhigh c:\dos\smartdrv.exe
prompt $p$g
path c:\dos;c:\windows
set temp=c:\dos
cls
ver
choice /c:YN /t:N,5 "Run Microsoft Anti-Virus"
if not errorlevel 2 msav /l /p
if "%config%" == "network" goto network
if "%config%" == "pc3270 goto pc3270
if "%config%" == "travel" goto travel
:network
@echo Starting the network...
c:\windows\net start
goto common
:pc3270
@echo Loading PC-3270 Support...
rem
rem At this point, AUTOEXEC.BAT would load any 3270 emulators.
rem
goto common
:travel
@echo Loading travel software...
loadhigh power.exe
loadhigh mouse.com
goto common
:common
loadhigh c:\dos\share.exe
loadhigh c:\dos\doskey /insert
choice /c:YN /tY,5 "Run Microsoft Windows"
if not errorlevel 2 win
  
In this sample AUTOEXEC.BAT file:
·	The first part of the file contains commands to be carried out for all configurations. 
·	The first choice command displays a prompt asking if you want to run Microsoft Anti-Virus. The 
	default is No.
·	The three if commands test the value of the CONFIG variable, which MS-DOS sets to the block 
	name of the configuration that was selected from the startup menu. The goto command at the 
	end of each if command directs MS-DOS to carry out the commands in the AUTOEXEC.BAT 
	section with the corresponding name.
·	The :network, :pc3270, and :travel sections contain commands to be carried out for those 
	configurations. The goto common command at the end of each section directs MS-DOS to 
	carry out the commands in the :common section.
·	The :common section contains commands to be carried out for each configuration. Besides 
	commands that load the Share and Doskey programs, the :common section contains a 
	choice command that displays a prompt asking if you want to run Microsoft Windows.
  

 