Eject CD Rom in Dos

1 Aufruf
Direkt zur ersten ungelesenen Nachricht

Anthony B

ungelesen,
24.03.2001, 14:58:1124.03.01
an
I've used Network Boot CD's for dos for Workstation Builds.. I'd like a dos
executable that will eject the CD ROM when run from a batch file...

Any ideas? Something should exist but believe me, it's hard to find..
Please respond to My Email address if possible Thanks

antgo...@yahoo.com


Frank-Peter Schultze

ungelesen,
24.03.2001, 17:05:3724.03.01
an

I wrote this eject utility, ehm, 6 or 7 years ago...

http://www.fpschultze.de/cd-rom.exe

__ _ _
|_ |_)(__ http://www.fpschultze.de
___| | ____)chultze_________________________________________________
I am logged in, therefore I am.

Frank-Peter Schultze

ungelesen,
24.03.2001, 17:02:4524.03.01
an

I wrote this eject utility, ehm, 6 or 7 years ago:

Outsider

ungelesen,
24.03.2001, 17:21:0224.03.01
an
Frank-Peter Schultze wrote:
>
> I wrote this eject utility, ehm, 6 or 7 years ago:
>
> http://www.fpschultze.de/cd-rom.exe
>

What does this mean?
Kein CD-ROM-Laufwerk angemeldet.


--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
MS-DOS 7.1, Windows 4.1 (a.k.a. 98), Netscape Navigator 4.74

Frank

ungelesen,
24.03.2001, 17:36:3724.03.01
an
Outsider <3ABD1DCE...@yahoo.com>...

^ What does this mean?
^ Kein CD-ROM-Laufwerk angemeldet.

You have a silly CD-ROM drive and it's melting.

Frank


Frank-Peter Schultze

ungelesen,
24.03.2001, 17:47:1924.03.01
an

No CD-ROM drive present -> MSCDEX.EXE not loaded.

--

Timo Salmi

ungelesen,
24.03.2001, 23:54:2624.03.01
an
In article <n%6v6.420906$w35.66...@news1.rdc1.nj.home.com>,

Anthony B <antgo...@home.com> wrote:
> I've used Network Boot CD's for dos for Workstation Builds.. I'd like a dos
> executable that will eject the CD ROM when run from a batch file...

You asked exactly the same question in news:alt.msdos.programmer
Please see my response in there.

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html

Todd Vargo

ungelesen,
25.03.2001, 01:40:2525.03.01
an

"Frank" <rszkr...@tjngyhjbalzojzhz.com> wrote in message
news:01c0b4b3$2862c080$0125250a@tjngyhjbalzojzhz...

LOL


Nyk of 6

ungelesen,
25.03.2001, 14:42:4825.03.01
an
Bust a rib *r o t f l m f a o*


KILLAH989

ungelesen,
27.03.2001, 05:03:4927.03.01
an
>Subject: Re: Eject CD Rom in Dos
>From: "Frank-Peter Schultze" fpsch...@my-deja.com
>Date: 24/03/01 23:05 GMT Daylight Time
>Message-id: <99j5fk$108r$1...@news.nikoma.de>
This eject utility doesn't work!!, do u have the source code for it? if so can
u please post it to the news group.

Regards

Frank-Peter Schultze

ungelesen,
27.03.2001, 16:19:2227.03.01
an
"KILLAH989" wrote:

> This eject utility doesn't work!!, do u have the source code for it? if so
can
> u please post it to the news group.
>
> Regards

Due to harddisk crash some years ago I have lost most of my work. Whatever -
I rewrote the utility using two useful units...

http://www.fpschultze.de/ejectcd.zip

Notes:

- This utility was developed for use in pure MS-DOS
- In Windows 9x you _must_ use your real-mode CD-ROM driver and MSCDEX.EXE
- BTW, it runs in Windows 2000
- Off topic ;-)

--

Outsider

ungelesen,
28.03.2001, 02:09:1228.03.01
an
Frank-Peter Schultze wrote:
>
>
> Due to harddisk crash some years ago I have lost most of my work. Whatever -
> I rewrote the utility using two useful units...
>
> http://www.fpschultze.de/ejectcd.zip
>
> Notes:
>
> - This utility was developed for use in pure MS-DOS
> - In Windows 9x you _must_ use your real-mode CD-ROM driver and MSCDEX.EXE
> - BTW, it runs in Windows 2000
> - Off topic ;-)


This is on topic since this utility is for batch file use.


CD-ROM.EXE 2.365 bytes <---older version
EJECTCD.EXE 6.288 bytes <---newer version

The new version is much larger and occupies 2 clusters on my system.
The old version occupies only 1 cluster. The old version also closes
the tray, the new version does not, nor does the old version require
a drive letter. My vote is for the older version.


A problem with both versions is once the tray is opened with
the program, it is locked open and cannot be closed manually
without forcing, and this is troublesome bug in the program.
I have seen other programs that do not have this bug; after
the tray is opened, control is relinquished and it can be
pushed in normally.

For what it's worth.

Frank-Peter Schultze

ungelesen,
28.03.2001, 18:57:3328.03.01
an
"Outsider" wrote:
> Frank-Peter Schultze wrote:
> >
> >
> > Due to harddisk crash some years ago I have lost most of my work.
Whatever -
> > I rewrote the utility using two useful units...

Revised version: http://www.fpschultze.de/ejectcd.zip

[snip]


> The new version is much larger and occupies 2 clusters on my system.
> The old version occupies only 1 cluster. The old version also closes
> the tray, the new version does not, nor does the old version require
> a drive letter. My vote is for the older version.
>
> A problem with both versions is once the tray is opened with
> the program, it is locked open and cannot be closed manually
> without forcing, and this is troublesome bug in the program.
> I have seen other programs that do not have this bug; after
> the tray is opened, control is relinquished and it can be
> pushed in normally.
>
> For what it's worth.
>
> --
> <!-Outsider//->
> MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
> MS-DOS 7.1, Windows 4.1 (a.k.a. 98), Netscape Navigator 4.74

Thanks for this feedback.

Coding the old version I have used TP6's inline assembler, less error
checking, and PKLITE to compress the executable file, therefore it's
smaller. I revised the new version. Now it detects the device's status and
opens or closes tray. Though I can't get it 'PKLITEd' in a 4.096 byte
cluster (plays it really a role these days?) I recommend to use the remake.

Do you want some advanced features, for example ERRORLEVEL depending on the
status (CD/no CD in drive, door openend, door closed, ...)?

Outsider

ungelesen,
29.03.2001, 03:09:0329.03.01
an
Frank-Peter Schultze wrote:
>
> "Outsider" wrote:
> > Frank-Peter Schultze wrote:
> > >
> > >
> > > Due to harddisk crash some years ago I have lost most of my work.
> Whatever -
> > > I rewrote the utility using two useful units...
>
> Revised version: http://www.fpschultze.de/ejectcd.zip
>
> [snip]
> > The new version is much larger and occupies 2 clusters on my system.
> > The old version occupies only 1 cluster. The old version also closes
> > the tray, the new version does not, nor does the old version require
> > a drive letter. My vote is for the older version.
> >
> > A problem with both versions is once the tray is opened with
> > the program, it is locked open and cannot be closed manually
> > without forcing, and this is troublesome bug in the program.
> > I have seen other programs that do not have this bug; after
> > the tray is opened, control is relinquished and it can be
> > pushed in normally.
> >
> > For what it's worth.
> >

> Thanks for this feedback.
>
> Coding the old version I have used TP6's inline assembler, less error
> checking, and PKLITE to compress the executable file, therefore it's
> smaller. I revised the new version. Now it detects the device's status and
> opens or closes tray. Though I can't get it 'PKLITEd' in a 4.096 byte
> cluster (plays it really a role these days?) I recommend to use the remake.
>
> Do you want some advanced features, for example ERRORLEVEL depending on the
> status (CD/no CD in drive, door openend, door closed, ...)?

IMVHO: I still prefer the older version.
Ideally, there would also be options to check the status open/closed, if media
is present and if it is a data or audio CD. Perhaps also if it is readable since
all types of data CD's may not be readable on all drives. An errorlevel could be
returned for each the different states. Nowadays, it seems many people have more
than one CD drive, so I would opt for the default behavior (with no drive letters
used) affecting the first available CD-ROM drive and the option of supplying a
drive letter if desired.

garynine

ungelesen,
01.04.2001, 17:13:4601.04.01
an

"Anthony B" <antgo...@home.com> wrote in message
news:n%6v6.420906$w35.66...@news1.rdc1.nj.home.com...

I'm a newbie with batch, but I came across this just yesterday:

<BEGIN TEXT IMPORT>

Opening or closing a CD with QBASIC is a two-line
operation. Both require the name of the CD driver
under DOS. You can find this by looking in your
C:\CONFIG.SYS file. There should be a line that
will look something like this:
DEVICE = C:\BLAH\BLAH\CD_DRIVER.SYS /D:MSCD0000
What we are looking for is everything after the
"/D:" and up to the next space. In the above
example, the CD driver name would be "MSCD0000".
If you have more than one line with a /D: on it,
look for a name of the SYS file (CD_DRIVER.SYS
in the above example) that has a name based on
your CD manufacturer's name. Like maybe "TOSHCD"
if your CD was made by Toshiba. You get the idea.
In all the code below, you'll see "MSCD0000", but
you should replace that with the actual name of
the CD driver on your system.

I've wrapped the QBASIC code in a batch file to
make it a bit easier to use. To open a CD from a
batch file:

echo OPEN "MSCD0000" FOR OUTPUT AS #1> %TEMP%\CD.BAS
echo IOCTL #1, CHR$(0)>> %TEMP%\CD.BAS
echo SYSTEM>> %TEMP%\CD.BAS
QBASIC /RUN %TEMP%\CD.BAS
DEL %TEMP%\CD.BAS

To close a CD from a batch file:

echo OPEN "MSCD0000" FOR OUTPUT AS #1> %TEMP%\CD.BAS
echo IOCTL #1, CHR$(5)>> %TEMP%\CD.BAS
echo SYSTEM>> %TEMP%\CD.BAS
QBASIC /RUN %TEMP%\CD.BAS
DEL %TEMP%\CD.BAS

<END TEXT IMPORT>

For the full page, go to:

http://www.calweb.com/~webspace/batch/samples/opencd.bat.txt

I hope this helps.

Gary

Todd Vargo

ungelesen,
01.04.2001, 23:20:0501.04.01
an

garynine wrote in message ...


Does this work in DOS mode only or in Windows too? I don't have a CD-ROM on
this machine, but I'll try it tomorrow if there is no reply.

Todd Vargo (body of message must contain my name to reply by email)

KILLAH989

ungelesen,
03.04.2001, 04:57:3703.04.01
an
>Subject: Re: Eject CD Rom in Dos
>From: "Todd Vargo" t...@birdlover.com
>Date: 02/04/01 04:20 GMT Daylight Time
>Message-id: <9a8r4d$3p5cu$1...@ID-25025.news.dfncis.de>

Can some1 help plz, my config.sys file doesn't say that, in the device line it
has this:
device=C:\WINDOWS\COMMAND\display.sys con=(ega,,1)

So wot can i do from this??


Rik D'haveloose

ungelesen,
02.04.2001, 15:08:0502.04.01
an
Todd Vargo wrote:
>
> garynine wrote in message ...
> >"Anthony B" <antgo...@home.com> wrote in message
> >> I've used Network Boot CD's for dos for Workstation Builds.. I'd like a
> >>dos executable that will eject the CD ROM when run from a batch file...
> >>
> >> Any ideas? Something should exist but believe me, it's hard to find..
> >> Please respond to My Email address if possible Thanks
> > I'm a newbie with batch, but I came across this just yesterday:
> >
> ><BEGIN TEXT IMPORT>
> >
> >Opening or closing a CD with QBASIC is a two-line
> >operation. Both require the name of the CD driver
> >under DOS. You can find this by looking in your
> >C:\CONFIG.SYS file. There should be a line that
==8<

>
> Does this work in DOS mode only or in Windows too? I don't have a CD-ROM on
> this machine, but I'll try it tomorrow if there is no reply.

i tried it in a dos6.22 box in wfw3.11 and worked fine, except that
closing the cdrom drive seems to make wait qbasic rather long (some
seconds before prog continues)

i did adapt also the qbasic code somewhat, to make it more versatile
(for testing)

echo OPEN "CDROM1" FOR OUTPUT AS #1>cdclopen.bas
echo PRINT "cdrom open/close util">>cdclopen.bas
echo DO UNTIL i$ = "x">>cdclopen.bas
echo INPUT "c/o/x"; i$>>cdclopen.bas
echo IF i$ = "c" THEN>>cdclopen.bas
echo IOCTL #1, CHR$(5)>>cdclopen.bas
echo ELSEIF i$ = "o" THEN>>cdclopen.bas
echo IOCTL #1, CHR$(0)>>cdclopen.bas
echo END IF>>cdclopen.bas
echo LOOP>>cdclopen.bas
echo SYSTEM>>>>cdclopen.bas
QBASIC /RUN CDclopen.BAS

--
Lieve - Ri(n)ksken(s)
TUF Greetings from Rumbeke, Belgium

Please use only 1 e-mail adress if reply !


Todd Vargo

ungelesen,
03.04.2001, 23:13:1503.04.01
an

KILLAH989 wrote in message <20010403045737...@ng-fd1.aol.com>...

>>Subject: Re: Eject CD Rom in Dos


[snip]


>>> For the full page, go to:
>>>
>>>http://www.calweb.com/~webspace/batch/samples/opencd.bat.txt
>>>
>>> I hope this helps.
>>>
>>>Gary
>>
>>
>>Does this work in DOS mode only or in Windows too? I don't have a CD-ROM
on
>>this machine, but I'll try it tomorrow if there is no reply.
>>
>>Todd Vargo (body of message must contain my name to reply by email)
>>
>
>Can some1 help plz, my config.sys file doesn't say that, in the device line
it
>has this:
>device=C:\WINDOWS\COMMAND\display.sys con=(ega,,1)
>
>So wot can i do from this??


The code only works if the real mode driver is loaded, but windows will run
slower with it. Either you add the device line for your cdrom drive and take
the performance hit, or use another method (3rd party utility).

I don't use the real mode cd driver while windows is running. Call me
cynical, but IMO, automating the cd tray is like those VCR's that have an
eject button on the remote. You still have to physically get up and walk
across the room to remove the tape anyway (or push the tape back in if
pressed by accident) so what good is the button. Likewise, you have to reach
over to take out the cd, so how much effort is needed to press the eject
button while your hand is there, if you get my drift.

Outsider

ungelesen,
04.04.2001, 00:12:5204.04.01
an
Todd Vargo wrote:
>
>
> The code only works if the real mode driver is loaded, but windows will run
> slower with it. Either you add the device line for your cdrom drive and take
> the performance hit, or use another method (3rd party utility).
>
> I don't use the real mode cd driver while windows is running. Call me
> cynical, but IMO, automating the cd tray is like those VCR's that have an
> eject button on the remote. You still have to physically get up and walk
> across the room to remove the tape anyway (or push the tape back in if
> pressed by accident) so what good is the button. Likewise, you have to reach
> over to take out the cd, so how much effort is needed to press the eject
> button while your hand is there, if you get my drift.
>

Makes sense to me, but I need to access the CD-ROM from DOS, before
Windows is running. I cannot tolerate denial of access to my own
drives.

Todd Vargo

ungelesen,
04.04.2001, 03:37:3904.04.01
an

Outsider wrote in message <3ACA9F44...@yahoo.com>...

>Todd Vargo wrote:
>>
>>
>> The code only works if the real mode driver is loaded, but windows will
run
>> slower with it. Either you add the device line for your cdrom drive and
take
>> the performance hit, or use another method (3rd party utility).
>>
>> I don't use the real mode cd driver while windows is running. Call me
>> cynical, but IMO, automating the cd tray is like those VCR's that have an
>> eject button on the remote. You still have to physically get up and walk
>> across the room to remove the tape anyway (or push the tape back in if
>> pressed by accident) so what good is the button. Likewise, you have to
reach
>> over to take out the cd, so how much effort is needed to press the eject
>> button while your hand is there, if you get my drift.
>>
>
>Makes sense to me, but I need to access the CD-ROM from DOS, before
>Windows is running. I cannot tolerate denial of access to my own
>drives.


That's where Multi-config comes in handy. A different configuration for
every need. I once commented that it was easier/faster to just reboot Win98
than shutting down to return to the real mode DOS prompt (as in pre-Win9x
days). Oh wait a minute, your still working in those pre-Win9x days. One
could say you take a performance hit every time you execute the WIN command.
<g>

Rik D'haveloose

ungelesen,
04.04.2001, 15:29:1304.04.01
an
Todd Vargo wrote:
>
> The code only works if the real mode driver is loaded, but windows will run
> slower with it. Either you add the device line for your cdrom drive and take
> the performance hit, or use another method (3rd party utility).

i guess you mean W9x and up here ? As to performance hit, this seems to
me just some bad design of the OS. (as long as the real mode driver is
not used, it should have no trouble with it..., IMVHO )

> cynical, but IMO, automating the cd tray is like those VCR's that have an
> eject button on the remote. You still have to physically get up and walk
> across the room to remove the tape anyway (or push the tape back in if
> pressed by accident) so what good is the button. Likewise, you have to reach
> over to take out the cd, so how much effort is needed to press the eject
> button while your hand is there, if you get my drift.

indeed, i also feel that way, but if 'automating' comes around, i also
fail to see why it couldn't be used..
instead of only displaying some message to change CD, and not using the
eject-possibility (so the user has to push himself to eject), and also
some speed-gain, as the users reaction will not be that fast as the
automated eject (and then can take out/switch cd directly...)

Oh yes, that's some feature of all those remote controls, so we need to
go sporting/jogging to keep up our fitness :-)

Allen antworten
Dem Autor antworten
Weiterleiten
0 neue Nachrichten