Managing A Personal Computer
1.1 The AUTOEXEC.BAT file is one of files
which loads every time the computer is booted. It contains command lines
and procedures to run programs and load settings for the system’s hardware
and software configuration. It also may contain command lines procedures
to run programs which may clean your system’s hard drive of temporary files
An example of this file is shown below:
LH C:SBCDDRVMSCDEX.EXE /S /D:MSCD001
SET BLASTER=A220 I5 D1 T4
The first line of this batch file, @ECHO
OFF, is programming command which hides all the command lines procedures
from the user.
The second line is also a programming
command that configures the CUI command prompt. The parameters after PROMPT
tell the CUI what to show. The $P stands for current drive and path and
$G stands for the greater than sign (>). Apart from those two parameters,
a user can add any characters after PROMPT and it’ll be shown as the command
The next command configures the CUI to
search for files in that directory first before looking in its current
location. The SET and PATH command procedures, even though different commands,
are used in conjunction to configure CUI environment variables and the
parameters displayed after that are what the CUI will search in first.
The next command is loading DOS’s CD-Rom
drive letter allocater (The CD-Rom driver must be loaded first in the CONFIG.SYS).
The parameters after the executable file inform the CUI to allocate a particular
drive letter for the CD-Rom and also may inform the CUI to allocate extended
memory or how to read the CD-Rom in terms of speed and sectors. The LH
configures the CUI to load this command procedure in high or extended memory.
The next command procedure allocates the
Interrupt and Drive Memory allocation for the system’s sound card as well
as informing the CUI of the sound card’s input/output range.
The next command procedure informs the
CUI to look for all the drivers for the sound card in its parameters which
will be a directory on the hard disk.
The last command loads the driver for
the mouse. This command procedure doesn’t need any parameters and is just
a single command procedure telling the CUI to load that executable file.
1.2 A Batch File Which Asks For User Input:
IF "%1"=="C" GOTO DRIVE
IF "%1"=="D" GOTO DRIVE
if "%1"=="c" goto drive
if "%1"=="d" goto drive
echo Please type INSTALL X (Replace X with
your hard drive letter)
echo eg. INSTALL C
echo Welcome to the Batch Input Demo written
by Leon Douglas.
echo Do You wish to continue?
choice /n Yes or No
Without going into excessive detail of
this batch program, what it is accomplishing is a drive letter to install
a program into as well as a yes or no instruction to continue. The first
part of the batch file which is in bold is the piece of programming that
requires a drive letter to be typed as a parameter to the batch file. It
will only recognise C or D as drive letters, whether it be as uppercase
or lowercase. If the user does not type a parameter or types a different
drive letter other than C or D, the batch file will display a message that
states a drive letter is required before continuing.
In the second piece of programming which
is in italics is what the user will see if they type C or D as a parameter
next to the batch file’s name as the command procedure. This part of the
programming asks the user whether to continue with the installation or
not. If the user types anything apart from yes,no,y or n the program will
not proceed until the correct parameter is typed. If the user enters the
correct parameter the program will proceed to the next step which is shown
above in bold and Italics. This part of the batch program makes a directory
on the given drive and then copies another batch file from the same location
as itself to the directory it created. From here, this batch file terminates
after the command procedure is given to start the other batch file.
1.3 Macros That Automate Procedures Within
A GUI (Windows)
Within Windows 95 there are several ways
that procedures can be automatically loaded without the input of a user.
The two most common methods are by placing command line procedures as icons
within the Startup folder of Windows or by placing the command line procedures
in the LOAD= line of the WIN.INI. Another method is by