Results 1 to 8 of 8

Thread: Is it possible to eject a cd in a batch file on Windows XP?

  1. #1
    How to eject dvd drive burner using Batch file ?

    Hi every one
    I'm using windows Xp and I need Batch file to do this
    I googled it and I didn't find the source code

    It true there are other exe programs that do this

    But am in need of Batch file

    Thanks in advance

  2. Internet, Programming and Graphics   -   #2
    As far as I know, you can't open the tray with a batch file directly, but you can use this small app:
    http://www.nirsoft.net/utils/nircmd.html

    Nice nickname, by the way.

    Edit: two other apps:
    http://memberwebs.com/stef/software/eject/
    http://www.rjlsoftware.com/software/utility/open_cd/
    Last edited by anon; 05-07-2010 at 08:03 PM.
    "I just remembered something that happened a long time ago."

  3. Internet, Programming and Graphics   -   #3
    Thanks for your quick replay
    and thank for prizing my nickname

    In deed I don't need exe programes
    as I mentioned above

    but I need batch file
    I mean the source code

    thanks again

  4. Internet, Programming and Graphics   -   #4
    Batch files and source codes are two different things.
    "I just remembered something that happened a long time ago."

  5. Internet, Programming and Graphics   -   #5
    Again I really appreciate your interesting
    Thanks mate.

    The source code is what is written inside the batch file

    for example this source code:

    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 get the batch file
    you have to open notepad
    and past this code and then
    save it as eject.bat (for example)
    and you will get the batch file.

    I hope you got my point.

  6. Internet, Programming and Graphics   -   #6
    With the NirCmd thingy all you need is this:
    Code:
    @nircmd.exe cdrom open X:
    Where X: is the letter of the drive you want to eject.
    "I just remembered something that happened a long time ago."

  7. Internet, Programming and Graphics   -   #7
    Quote Originally Posted by anon-sbi View Post
    With the NirCmd thingy all you need is this:
    Code:
    @nircmd.exe cdrom open X:
    Where X: is the letter of the drive you want to eject.
    I agree with you mate. I Know there are appp that can do this.
    But again, I need the Batch file
    or the source code of Batch file
    and nothing else, This is what I'm looking for.

    Thank you mate.

  8. Internet, Programming and Graphics   -   #8
    Quote Originally Posted by iCABALO View Post
    But again, I need the Batch file
    or the source code of Batch file
    Right there, in the "code" block. Just paste that in Notepad, replace X: with your optical drive's letter, save it as a .bat file in the same folder NirCmd is, and run it.
    "I just remembered something that happened a long time ago."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •