Auto Explain
Memory from Crucial.com

 

 

 

 

 

Home                

Win98-FAQ

Win-ME DOS

Win-ME FAQ

MS-MVP Links

Favorite Links

Driver Links

Auto Format

What's New

 

How all this works!!

Let's start by explaining what happens when you boot a machine with your Automated Startup Disk. There's no need to explain all the ECHO commands. ECHO means to display the text on the screen and ECHO OFF hides it. When your system boots from your Startup Disk the Autoexec.bat and Config.sys files are read. From these files the system then carries out the commands written within them. To help read and understand what these commands do, I have made these commands bold with a description just below.

The Autoexec.bat

IF EXIST A:\status.1 GOTO :SYS
Checks for what status the setup procedure is in. If the file A:\status.1 exists, then hard drive has been partitioned and it is ready to be made bootable, have the OS install files copied to it and run setup.

ECHO Press Ctrl C to stop or press any other key to continue.

Tells the system to display the message "Press Ctrl C to stop the process or press any key to continue". This gives a user a second chance to quit.

 

PAUSE

Tell the batch to stop and wait for user input.

 

ECHO Checking for an existing Drive C: ...
ECHO.
ECHO 0 > C:\status.0

Check to see if there is a C: drive by trying to create a dropper file named C:\Status.0. If there is a C:\Status.0 file, delete all partitions on the drive, otherwise jump ahead and create the new partition.

 

IF NOT EXIST C:\status.0 GOTO :MAKEPART

Tells the batch if there's not a existing Partition already on the drive then move on to the MakePart command.


IF EXIST C:\status.0 GDISK 1 /DEL /ALL
Tells the batch if a Partition does exist then remove it and create a new one.


:MAKEPART
GDISK 1 /CRE /PRI /FOR /Q

GDISK 1-- Tells GDISK we are working with Physical Harddisk 1.

/CRE and /PRI tells GDISK to create a Primary partition.

/FOR and /Q tells GDISK to do a quick Format.

ECHO 1 > A:\status.1

Creates a dropper file on A: to track the setup process


RESTART
I wonder what this means <VBG>

After a new Partition is created the system must be restarted before the changes will take effect.


SYS C:

Copies system file over to your hard drive and makes it bootable.


LH A:\MSCDEX.EXE /D:MSCD001

LH is short for Load High which loads the CD-ROM Extension into the high memory area. MSCDEX.EXE is short for Microsoft CD-ROM Extension.


DEL A:\status.1

Del is short for Delete and removes the status.1 file from the floppy so it's ready to be used again.


MD C:\WINDOWS

MD is short for Make Directory and the command above tells DOS to create a directory called Windows.


MD C:\WINDOWS\OPTIONS

Tells DOS to create a sub-directory called Options


MD C:\WINDOWS\OPTIONS\CABS

Once again tells DOS to create an addition sub-directory called Cabs.


D:

Tells DOS to switch back to the CD-ROM drive.


CD \WIN98

CD is short for Change Directory and in this case it tells DOS to change to the Win98 directory located on the Windows 98 CD.


COPY D:\WIN98\*.* C:\WINDOWS\OPTIONS\CABS

Tells DOS to copy everything located in the Win98 directory to C:\WINDOWS\OPTIONS\CABS directory. The *.* are wild cards that tells DOS no matter the name of the files to copy them.


C:

Tells DOS to switch back to the C: drive.


CD \WINDOWS\OPTIONS\CABS

Tells DOS to Change Directory, in this case the C:\WINDOWS\OPTIONS\CABS.


SETUP

Starts the Windows Setup.

 

 

If you search the Microsoft Knowledge Base for Key words such as, "Automate Setup", you will find articles to help further enhance this batch process by Automating Windows setup as well, so everything can be done all at one time. To give you a head start, I'll provide this KB, the rest you're on your own :>)

 

http://support.microsoft.com/support/kb/articles/q214/7/27.asp