Section 3 - Miscellaneous Information

3.1 - Examining the Windows 98 CD-ROM

This CD is bootable and is a good example of how to support booting of both SCSI and IDE CD-ROMS. For educational purposes only, I have put the files on the Win98 CD into a file for you to download. It contains several generic ASPI layers and device drivers as well as menu statements in the CONFIG.SYS which you can use as a template to create your own.. I have tested these on a number of systems with 100% success.

Download BOOTCD.ZIP (554KB)

To make a bootable CD using the above files, first create a bootable floppy as outlined in section 2.2, then extract the zip file to your disk, overwriting any files. Examine the AUTOEXEC.BAT and CONFIG.SYS files. See how they work? A dissection of these files is given in the next section.

For a quick setup, simply remove the "end" part of the AUTOEXEC.BAT as that is concerned with Windows 98 setup. I left it in for completeness sake.

Once you have finished editing, test your floppy as outlined in section 2.3 then proceed to burn your CD as per section 2.4

Back to FAQ Contents

3.2 - Dissection of the AUTOEXEC.BAT and CONFIG.SYS Files

If you haven't already done so, click here to download the files that are on the bootable section of the Windows 98 CD before continuing with this section. This section should hopefully give you a better understanding of how these files work and give you some sense of the many versatile configurations you can give your boot cd.

NB: Red text denotes comments and should not be included in your file!

Skip to analysis of CONFIG.SYS file

-------------------------------------------------START OF AUTOEXEC.BAT---------------------------------------------

@ECHO OFF

set EXPAND=YES Regular 'set' statements
SET DIRCMD=/O:N
cls
set temp=c:\
set tmp=c:\
path=a:\
Important! This means that the OS will search this directory for executables, allowing us to use 'relative' executable names (without the path). Note for a basic setup, you can simply exclude the rest of the file, ie cut here.

IF "%config%"=="NOCD" GOTO QUIT This line checks whether the user selected the 'NO CD' option, set up in the CONFIG.SYS file. If so, execution branches to the label :QUIT. If not, then execution proceeds as normal.
LH MSCDEX.EXE /D:oemcd001 /L:D

echo.
IF "%config%"=="SETUP_CD" goto AUTOSETUP
Similar to the above. Check the first part of the CONFIG.SYS file. See how a 'menu' can be created and processed?
GOTO QUIT

:AUTOSETUP
set CDROM=FOO23
Think of this as initialising a batch file variable.
FINDCD.EXE
This is very interesting. I have devoted a section to covering this executable. At the moment it tests for the existence of the Windows 98 SETUP.EXE. Hence this will only work if you have your \Win98 directory on the CD. Section... outlines a workaround for this and goes into more detail.
if "%CDROM%"=="FOO23" goto NOCDROM
path=a:\;%CDROM%\
FINDCD.EXE returns the drive letter of the drive the cd is in, assigning it to CDROM. Hence the next line switches to that drive.
%CDROM%
cd \WIN98
echo.
OEMSETUP.EXE /K "/IE /NF"
goto QUIT

:NOCDROM
echo.
echo The Windows 98 Setup files were not found.
echo.

:QUIT

-------------------------------------------------END OF AUTOEXEC.BAT------------------------------------------------

The following CONFIG.SYS file is pretty standard in terms of what device drivers it loads. I give a break down on it however because it shows how to create a menu and execute certain statements based on the user's choice. For those of you who haven't come across it before, the following type of CONFIG.SYS file was used to allow a user to select certain system configurations with MS-DOS, much like you can today with Windows 95 & 98, using the 'Hardware Profiles' manager.

NB: Red text denotes comments and should not be included in your file!

Skip to analysis of AUTOEXEC.BAT file

-------------------------------------------------START OF CONFIG.SYS--------------------------------------------------

[menu] Denotes the beginning of the 'menu block'. Required. Each subsequent 'menuitem' creates your menu.
menuitem=SETUP_CD, Start Windows 98 Setup from CD-ROM.

In general the syntax is: 'MENUITEM=blockname, menutext' where blockname is required. There are some rules you may not be aware of. See the paragraph after this for details.
menuitem=CD, Start computer with CD-ROM support.
menuitem=NOCD, Start computer without CD-ROM support.
menudefault=SETUP_CD,30
The default menu item is specified and will execute after 30 seconds if there is no user intervention.
menucolor=7,0
Sets the colour for the menu.

[SETUP_CD]
A corresponding menuitem block
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001

[CD]
When the OS encounters a blockname, the variable 'CONFIG' is assigned it. Refer to the AUTOEXEC.BAT file above. See how the variable 'CONFIG' is used to branch to different parts of the file and execute different statements?
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001

[NOCD]
device=himem.sys /testmem:off

[COMMON]
If a 'COMMON' section is included, its statements are executed always. By convention it should be at the end of the file.
files=60
buffers=20
dos=high,umb
stacks=9,256
lastdrive=z

-------------------------------------------------END OF CONFIG.SYS---------------------------------------------------

When creating menus, keep in mind the following points:

blockname can be up to 70 characters long. It can't contain spaces or the following: / \ , ; = [ ]

menutext can be up to 70 characters long and can contain any text. If menutext is not supplied, blockname is displayed instead.

menuitems without a corresponding 'block' will not be displayed.

You may have up to 9 menuitems.

Back to FAQ Contents

3.3 - Examining FINDCD.EXE and how to modify it

3.3.1 - Examining FINDCD

The previous section showed how to create menu items that could be used for a bootable CD by going over the system files, AUTOEXEC.BAT and CONFIG.SYS, included in BOOTCD.ZIP (Windows 98 boot files). This section discusses FINDCD.EXE (FINDCD) and why it is of interest.

FINDCD, as it exists, tests for the existence of SETUP.EXE in the \Win98 directory of the original Windows 98 installation CD. If found, the drive letter is returned and SETUP is executed. Now, why do it this way? Why not simply have a statement such as 'E:\Win98\SETUP.EXE' ?

This is fine if E: drive will always be your CD-ROM drive. But consider the following. You install a new hard disk and hence your CD-ROM drive letter becomes F:. So, FINDCD is quite nifty in that it finds the correct drive letter. We then can use 'relative' names of executables, as outlined in the previous section.

Of course, if you are creating the simplest of boot CDs, you could just have it boot up and you can do the rest. So in essence this section is for those people who want to automate certain tasks. Knowing which drive letter to use becomes important.

Problem is, what if we don't want to include the \Win98 directory? FINDCD fails. Thankfully we can 'Hex edit' it so it tests for whatever file we want.

Back to FAQ Contents

3.3.2 - Modifying FINDCD

You will need: A hex (hexadecimal) editor. I used HEDIT (96K), a simple windows hex editor, which is referred to for this part. Although, any other hex editor will do the job.

1. Copy FINDCD.EXE to a temporary directory. It's good to have an original copy hand in case you stuff up.

2. Load FINDCD into your hex editor.

3. Scroll (it's not a long file) down until you see the following text:

Hex Editing FINDCD.EXE with Hedit

The part we are interested in is the following '=.%c:\WIN98\SETUP.EXE.%c' san quotes. (Take note of the full stops/periods)

This is where we will substitute our file for testing. Note the following:

1. Our file name will overwrite the existing string. To keep it simple the file should be in the root directory and of a short length. (Should fit between the first %c and the next %c on the next line.) FINDCD does not check the size of the file so a zero byte file should work OK.

2. Examine the above image, to the left of the line that begins SETUP.EXE. These are the hexadecimal values that represent what we type in.

4. Click the first \ This is where we will start typing. Note that when you do this, the corresponding hex value is highlighted.

5. If the file name is shorter than the original, ie your string doesn't fill up to the '.' before the last %c DO NOT type '.' as this enters the incorrect hex value. Null characters can be inserted by selecting the corresponding hex value and entering '00' (zero zero). (In the above image, 3 sets of numbers to the left of SETUP.EXE you will see 00. This corresponds to the last '.' before the final %c.)

The following image shows what the screen would show if we wanted FINDCD to test for 'myfile'

Hex editing FINDCD.EXE - Example

Hedit highlights the changes in red to make it easier for you. Again note the 00s to denote null characters.

6. Close the file, saving changes.

A suitable file to test for might be GHOST.EXE if you are creating a GHOST boot CD. Indeed, doing this to return the drive letter makes a GHOST restore as easy as placing the CD in the drive and booting the system!

Back to FAQ Contents

3.4 - Where can I get the software you have mentioned in this FAQ?

The software mentioned in this FAQ can be obtained from the following places:

Adaptec CD-R Software - produce Easy CD Creator, Easy CD Pro and various other softwares and hardwares.

Ghost Software - Produce GHOST, a specialised disk imaging program.

Powerquest - Make Partition Magic, an on the fly partitioning program that everyone should have!

HEDIT - a shareware hexadecimal editor. Very useful.

Back to FAQ Contents

3.5 - I want to learn more about CD recording in general, where do I start?

There are some great resources on the net for information concerning the CD-R scene. Try these. More will be added later.

CD-R FAQ - Maintained by Andy McFadden, it's a brilliant place to start if you are new to the CD Recording world.

Adaptec CD-R List - A mailing list. This is the primary troubleshooting resource for CD-R users. Use this link to browse the archives and join.

Boot CD FAQ and Info by Seth - Another FAQ on Bootable CDs (Was down for a time, but now, mysteriously, up again).

How to Make a PC Bootable CD - by Tung Cheng Tsai. A very detailed, well presented page on how to manually create a boot CD. Well worth a look.

Home of MKBOOTCD - Japanese site, unsure of the author.

Dergrib's Bootable CD Page - By Jason Livingstone, maker of BOOTISO. Users of Adaptec's Easy CD Pro should take a look at his instructions for using BOOTISO to make a boot CD.

Back to FAQ Contents

3.6 - Can I add to this FAQ?

Certainly! Please notify me of anything you may think is pertinent. Also, please notify me of any erroneous information. You can find my e-mail address at the bottom of every page.

NB: - Please do not send me previously published material. If you found the material on another web site, then provide the site and acknowledge the author.

Back to FAQ Contents

3.7 - I am having some trouble, what can I do? (LINKS)

At the moment I have I error that I know a solution to. It is described below.

"Upon loading of the ASPI manager, I get 'COMMAND.COM is corrupt or missing...'. This only happens when I have made the bootable CD. What do I do?"

Download BOOTCD.ZIP (554KB). It contains generic ASPI drivers. There should be one that works with your configuration.

If you have other problems and solutions, please notify me and I will add them to this page.

If you have other problems, try the links listed in section 3.5

For problems pertaining to GHOST please use the support section of Ghost Software.

Back to FAQ Contents

damien.r.stewart@uts.edu.au