# Solved: Make an auto exec.bat line run before the rest of a config.sys processing?



## StumpedTechy (Jul 7, 2004)

Okay I have a quandry and I need to get around it.

My config sys pulls up a TON of network drivers depending on the network adapter we use. I have hit where I need to offload the drivers from 3 bootable floppies to a bootable CD. 1) because using 3 floppies just bites... 2)because the new workstations we are ordering come without floppies.

Here is what I decided to try and do but I can't get it to work.

I left the bootable floppy with the config.sys and autoexec.bat as it was but in the config sys I changed the Nic driver file locations to be X:\Path then on the CD I made it so the extra files were burnt to the data portion of the CD (not found by the boot section) and they are now in the 4 meg or so (compressed once I have this working as i want I also want to uncompress them to save even more time).

E.G.

Config.sys

[MENU]
menucolor=7,0
menuitem=A
menuitem=B
menuitem=C
and so on

[COMMON]
device=oakcdrom.sys /D:mscd001

[A]
Drivers for NIC A at X:\Path

*
Drivers for NIC B at X:\Path

[C]
Drivers for NIC C at X:\Path

------------------------

autoexec.bat

a few items not relevant
MSCDEX.EXE /D:mscd001 /L:X
some files stacks and bufferes not relevant either.

The problem I have is the config.sys tries to process fully BEFORE it hits autoexec.bat where autoexec.bat intializes the CD-Rom. So ANY NIC drivers I hardcode to X:\ won't work because X is not set yet until after the Autoexec.bat processes which is then too late.

Any suggestions on how to get the MSCDEX.EXE /D:mscd001 /L:X line in autoexec.bat to run before the processing of the config.sys menu?*


----------



## StumpedTechy (Jul 7, 2004)

Just in case anyone else is looking for this -

Take the driver line out of Autoexec bat and put it into the config.sys like so -

[MENU]
menucolor=7,0
menuitem=A
menuitem=B
menuitem=C
and so on

[COMMON]
device=oakcdrom.sys /D:mscd001
INSTALL MSCDEX.EXE /D:mscd001 /L:X

Then you don't need the line in autoexec.bat and all subsequent processing will find the drive letter.


----------



## JohnWill (Oct 19, 2002)

I didn't see this one in time to tell you about the INSTALL feature.


----------



## StumpedTechy (Jul 7, 2004)

Actually Johnwill I do have a problem with it still.

It seems when I do this -

[MENU]
menucolor=7,0
menuitem=A
menuitem=B
menuitem=C
and so on

[COMMON]
device=oakcdrom.sys /D:mscd001
INSTALL MSCDEX.EXE /D:mscd001 /L:X

[A]
Drivers for NIC A at X:\Path
(which happen to be device=XXXXX)

It actually processes the lines like this -
1) device=oakcdrom.sys /D:mscd001
2) Drivers for NIC A at X:\Path
3) INSTALL MSCDEX.EXE /D:mscd001 /L:X

I even did line by line processing and each time even though I have it next in line in common it's like it does ALL device= lines before it runs any install lines.

Any thoughts how to get it to process exactly like -
1) device=oakcdrom.sys /D:mscd001
2) INSTALL MSCDEX.EXE /D:mscd001 /L:X
3) Drivers for NIC A at X:\Path


----------



## JohnWill (Oct 19, 2002)

I think you have a problem there, since the INSTALL lines are processed after all the CONFIG.SYS processing is finished.

There was a little shim that would load drivers from AUTOEXEC.BAT, but for the life of me, I can't find it now with a Google search. That's probably because I don't remember the name, but it did solve this kind of issue.


----------



## StumpedTechy (Jul 7, 2004)

Actually I found a loader that is supposed to load config sys device items FROM the autoexec.bat. I have not tested it but this too may be a fix then I could put in all the lines and have the network device items load after I load the cd-rom device items. When I get back to the office on monday I'll post the file name as I found it right out on the web. Its a tiny exe easily fitting on a boot disk.


----------



## ryeookin (May 3, 2007)

Thanks Stumpedtechy, Johnwil split the thread. The other half is here:
http://forums.techguy.org/dos-pda-other/569709-dos-cd-rom-driver-sequence.html

I'll check both threads Monday.


----------



## StumpedTechy (Jul 7, 2004)

The program is devload.com its like 4kb and is supposed to load device drviers from the autoexec.bat.

Doing a google search on devload.com will yield a bunch of places to download the file.

What I intend to do is put this on the bootable floppy. Along with the CD-Rom driver. Then put all the CD-Rom driver loadup in the config.sys along with the autoexec.bat stings to initialize it. Then use this booable floppy to make a bootable CD-Rom. Then place all the network drivers to the file structure on the CD-Rom and then point the Autoexec.bat to load the netwrok drivers with the devload.com.

Mind you this will all be when I have time to run this test so it will more than likely wait a week or 2 before being done. I don't see any reason this theory won't work unless devload.com has its own limiations I am not aware of yet.


----------



## StumpedTechy (Jul 7, 2004)

Well this solution won't work with an XP startup disk. seems devload.com doesn't like the "version of dos" Oh well I can't go back in versions as i had problems with PC-Dos and some of the nic drivers... have to find another solution.


----------



## JohnWill (Oct 19, 2002)

How about putting the SETVER.EXE command in front of the DEVLOAD.COM line?


----------



## StumpedTechy (Jul 7, 2004)

setver looks as thought it only runs in the config sys does it work in the autoexec.bat?


----------



## JohnWill (Oct 19, 2002)

It changes the apparent version of the DOS so that you can run things that require a different version. You want it to run as early as possible.


----------

