Computing.Net > Forums > Programming > batch file and CD problems

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file and CD problems

Reply to Message Icon

Name: harry349
Date: November 20, 2004 at 03:42:50 Pacific
OS: Win98SE / DOS
CPU/Ram: Athlon XP 1700+ / 768MB
Comment:

I am booting off a Win98SE boot disk with CD-ROM support. In the AUTOEXEC.BAT, the last line reads something like:

%CDROM%:\foo\foo.exe

So it tries to run an executable from the CD-ROM drive when it's done booting.

This all works fine and good if the CD happens to be in the "first" CD-ROM drive in the system. If not, it fails miserably with a CDR101 error - the typical error you would get if trying to access a file from a CD-ROM drive that is currently empty.

I also tried:

if exist d:\foo\foo.exe ...

but the if exist line also displays error CDR101 if there is no disc in the drive.

Does anyone have a reasonable solution to this problem? I just want the boot procedure to automatically run an executable off the CD without any prompts or error messages, and I want it to work regardless of which CD drive it is in.

TIA
harry349



Sponsored Link
Ads by Google

Response Number 1
Name: KRB
Date: November 20, 2004 at 07:16:49 Pacific
Reply:

It is some thing to do with setting MASTER/ SLAVE and prymary/ secondary setting of CD rom.
It is hardware connection with ribbon cable to mother board or jumper setting of CDROM.
Check this out.


0

Response Number 2
Name: wizard-fred
Date: November 20, 2004 at 07:28:06 Pacific
Reply:

The best solution is to use a fixed letter for the CD drive that you want to access and put the CD into the drive.

You need a utility that would test whether there is a CD installed, but you would have the same problem if the wrong CD was inserted.

I have a 5 disk CD changer, which depending upon the driver has 5 drive letters, or a single letter. Think of the problem then.


0

Response Number 3
Name: harry349
Date: November 20, 2004 at 10:10:49 Pacific
Reply:

wizard-fred

That's an interesting idea about a utility that tests whether or not a CD is in the drive. If I know there is a CD in the drive, then I'm set. A series of

if exist d:\foo\foo.exe d:\foo\foo.exe

for each drive letter would work fine. Actually I'd probably use a series of gotos so it doesn't try all the other drives after I exit the program but before the batch file completes. Now I just need to find such a utility and see if I can harness its output from a batch file.

I am aware I could change around the order of the drives by physically cabling them differently inside the PC, but I'm trying to avoid that.

Thanks for your input.


0

Response Number 4
Name: harry349
Date: November 20, 2004 at 11:10:46 Pacific
Reply:

FYI - I found just such a utility, and it works great. It's called FindCD.

http://www.nu2.nu/utils/

Thanks again for the input.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


MB GB TB MiB GiB TiB ? switch from real to prot...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file and CD problems

Batch files and serial ports? www.computing.net/answers/programming/batch-files-and-serial-ports/16989.html

Make an exe with a batch file and.. www.computing.net/answers/programming/make-an-exe-with-a-batch-file-and/17595.html

i created a batch file and i'm invoking three www.computing.net/answers/programming/i-created-a-batch-file-and-im-invoking-three/19013.html