Scenario:

     Your computer's hard-disk lost all the data it contained and all you have is a bootable floppy with the following files: IO.SYS, MSDOS.SYS, and COMMAND.COM. If you bought your computer from a company like Gateway, you will also have the Windows CD-ROM, if you bought it from Compaq, you will have to call them and ask why they didn't ship the CD-ROM with the computer.

Solution:

     First of all, the Windows CD-ROM is useless without your CD-ROM drive's device driver. You will most likely have a floppy diskette with the necessary SYS driver.

     First you will boot the computer with the bootable floppy disk. Most people would want to put in the Windows CD-ROM and type D:\SETUP. This is not going work because MS-DOS doesn't know how to read the CD-ROM ISO file-system. MS-DOS understands SECTORS, CLUSTERS, etc, it doesn't know what to do with spiraling media.

     After booting the computer, we need to teach MS-DOS what a CD-ROM is and how to read it. We need to locate our CD-ROM drive's driver. Copy the driver's *.SYS file and MSCDEX.EXE to the floppy diskette. We now have the necessary files on our floppy. How do we inform MS-DOS about these files?

     We need to make a file named CONFIG.SYS which is a file MS-DOS reads (if present) after booting with IO.SYS but before loading COMMAND.COM. CONFIG.SYS is an ASCII text file but how do we make a text file without EDIT.COM? We will use a small trick available from the internal command COPY. The trick is to use the standard-in (STDIN) and standart-out (STDOUT) redirect commands of MS-DOS. We are going to manipulate the COPY command to write console input to a file on the hard-disk.
Syntax: A:\>COPY CON CONFIG.SYS What is going on? With COPY, we normally type in the filename to be copied followed by the clone's filename. CON is used by MS-DOS to designate the system console. The command essentially states: copy console data to the file: CONFIG.SYS.      We need to setup CONFIG.SYS to load the CD-ROM drive's device driver before COMMAND.COM is loaded. The syntax for the CONFIG.SYS file to load the driver is: DEVICE=MTMCDAI.SYS /D:MSCD001 Where MTMCDAI.SYS is the name of the device driver supplied by your computer's or CD-ROM drive's manufacturer. The /D:MSCD001 designates the driver's alias for the MS-DOS environment to use. The MSCD001 can be whatever you like but you will need to remember the chosen alias.

     So now we know what syntax we need to have in CONFIG.SYS to force MS-DOS to load the CD-ROM drive's device driver. What is the process? One additional note to using the COPY command's input redirect is how to terminate the input process. This is done with the keys: [Ctrl-Z] + [Enter]
A:\>COPY CON CONFIG.SYS DEVICE=MTMCDAI.SYS /D:MSCD001 ->[Ctrl-Z] -> [Enter] The previous example created the CONFIG.SYS file with the syntax: DEVICE=MTMCDAI.SYS /D:MSCD001.

     Now we are on our way to loading the Windows operating system. The next step is to restart (reboot) the computer. This will allow the MS-DOS operating system to load the new driver we specified in CONFIG.SYS.

     The computer is now restarted and we are at the command prompt. What next? We have the driver loaded but MS-DOS still doesn't know how to use the ISO filesystem. We are going to use an additional program named MSCDEX.EXE to teach it. This program was created by Microsoft as an addition to MS-DOS when the CD-ROM storage media was created. MSCDEX.EXE essentially designates a drive letter (ex: "D:") for MS-DOS to refer to the CD-ROM drive and associates the driver that will interpret the SECTOR, CLUSTER logic to and from ISO logic. The syntax will be: A:\MSCDEX /D:MSCD001 Notice the MSCD001 alias we created in CONFIG.SYS. We are specifying the specific driver MSCDEX should use. If you had multiple CD-ROM drives that will not share the same driver, you would create an entry for both drivers in the CONFIG.SYS file and run MSCDEX for each.

     MS-DOS now understands the ISO filesystem. We can now read the Windows CD-ROM. What next? The next step is to format the C: drive in order to clean out any problems that may be present. The FORMAT.COM file is available on the Windows CD-ROM in the \WIN9x directory. Run FORMAT.COM and format the hard-disk.

     After the format is complete, run SETUP.EXE from the CD-ROM's root directory. The Windows setup is rather simple, just follow the directions.

Conclusion:

     A good restoration disk can save valuable time. Make a bootable floppy disk with: [C:\>SYS C: A:]. Copy the CD-ROM's device drivers onto the diskette along with a few other programs: MSCDEX.EXE, FORMAT.COM, SYS.COM, and EDIT.COM. Make an AUTOEXEC.BAT file with the MSCDEX command so that your computer will understand the CD-ROM after completing the boot process.

     This scenario requires a bootable floppy disk. In the event you do not have a bootable diskette, you must obtain one before you can restore your computer.

     This scenario demonstrates advanced techniques that may be incorporated to restore the computer. We demonstrated: how to create a text file without a text editor, the syntax and commands necessay to use the CD-ROM drive, and the files on the CD-ROM used to format your hard-disk and setup Windows.

Notes:

     I used the COPY command to demonstrate a simple text file creation. The purpose of this is because it allows multiple line input. There is also another way to create a single-line text file: C:\>ECHO DEVICE=MTMCDAI.SYS /D:MSCD001 > CONFIG.SYS The previous example created the CONFIG.SYS file with the line: "DEVICE=MTMCDAI.SYS /D:MSCD001". The ECHO command simply writes to the screen all the text that follows the command. The ">" command is called a STDOUT redirect. Instead of ECHOing the text (STDOUT) to the CONsole, we redirected STDOUT to a hard-disk file called: CONFIG.SYS. There is an additional STDOUT redirect command ">>" which will append STDOUT to the specified file. Append means "Add to the end" of the file. This means we can also create multi-line textfiles with ECHO but it becomes a more complicated process. C:\>ECHO This is line 1 > example.txt C:\>ECHO This is line 2 >> example.txt C:\>ECHO This is line 3 >> example.txt C:\>TYPE example.txt This is line 1 This is line 2 This is line 3 C:\>ECHO This is line 4 > example.txt C:\>TYPE example.txt This is line 4 C:\>