Computer Hope

Microsoft => Microsoft DOS => Topic started by: EchoLdrWolf316 on August 18, 2008, 07:48:19 PM

Title: Disc Drive
Post by: EchoLdrWolf316 on August 18, 2008, 07:48:19 PM
Is there a code that can open or close a disc drive? Batch file or other?
Title: Re: Disc Drive
Post by: computeruler on August 18, 2008, 07:55:57 PM
http://www.dreamincode.net/code/snippet92.htm (http://www.dreamincode.net/code/snippet92.htm) thats visual basic though or you could go to start my computer and right click on your cd drive and click eject
Title: Re: Disc Drive
Post by: Dias de verano on August 19, 2008, 06:33:47 AM
prank? first remote shutdown, now open/close cd drive?

Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 06:35:22 AM
not a prank, i just wanted to see if i could make a batch file (to run a program or code) to open and close my drives.
Title: Re: Disc Drive
Post by: Carbon Dudeoxide on August 19, 2008, 06:36:48 AM
Why.........?

I know exactly what Dias is talking about...I've had hands-on experience...........
Title: Re: Disc Drive
Post by: qinghao on August 19, 2008, 06:40:12 AM
not a prank, i just wanted to see if i could make a batch file (to run a program or code) to open and close my drives.
I have done this before.
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 06:42:03 AM
Why.........?

I know exactly what Dias is talking about...I've had hands-on experience...........

im not trying to play a prank on my friends, ive read past posts. im not goina make their drives open, close open, close open, close open, close open, close open, close open, close. if i wanted to do that, i'd dowload a simple program off Cnet. Im just looking for code for myself
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 06:44:47 AM
not a prank, i just wanted to see if i could make a batch file (to run a program or code) to open and close my drives.
I have done this before.
how? batch file, Visual Basic? or a DOS command line?
Title: Re: Disc Drive
Post by: qinghao on August 19, 2008, 06:53:45 AM
Code: [Select]
Option Explicit
Private Declare Function CDdoor Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Select Case Button
        Case 1:
            Call CDdoor("set CDAudio door open", 0, 0, 0)
        Case 2:
            Call CDdoor("set CDAudio door closed", 0, 0, 0)
        Case 4:
            End
    End Select
End Sub
this VB code I think you know how to use it .so....
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 06:59:02 AM
Code: [Select]
Option Explicit
Private Declare Function CDdoor Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Select Case Button
        Case 1:
            Call CDdoor("set CDAudio door open", 0, 0, 0)
        Case 2:
            Call CDdoor("set CDAudio door closed", 0, 0, 0)
        Case 4:
            End
    End Select
End Sub
this VB code I think you know how to use it .so....
::) ::) ::) ::) uhh?  ::) ::) ::) save as what?

Title: Re: Disc Drive
Post by: qinghao on August 19, 2008, 11:03:24 AM
 :-\
....................
Try google ;D
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 01:07:09 PM
lol,, ok
Title: Re: Disc Drive
Post by: Dias de verano on August 19, 2008, 01:18:16 PM
Do you have Nero Burning ROM installed on the machine?
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 01:35:27 PM
Do you have Nero Burning ROM installed on the machine?
??? I have a CD burner

Title: Re: Disc Drive
Post by: Dias de verano on August 19, 2008, 01:38:50 PM
Do you, or don't you, have a CD burning package called Nero Burning ROM?

Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 01:42:44 PM
no
Title: Re: Disc Drive
Post by: Dias de verano on August 19, 2008, 01:48:45 PM
That's a shame, because it comes with a command line app which can open and shut the CD drive tray.

Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 02:05:30 PM
oh
Title: Re: Disc Drive
Post by: qinghao on August 19, 2008, 02:38:00 PM
First I heard he ask you of Nero,I think he will tell you there is a button on the nero window,you Click it the tray of the cd drive could come out and in.

fortunately,he tell you the it has command line.
haha...
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 19, 2008, 02:47:08 PM
  :) :P
Title: Re: Disc Drive
Post by: Dias de verano on August 19, 2008, 03:21:25 PM
First I heard he ask you of Nero,I think he will tell you there is a button on the nero window,you Click it the tray of the cd drive could come out and in.

fortunately,he tell you the it has command line.
haha...

I don't know what you are talking about, ginghao.  ::)

Nero Burning ROM is supplied with a command line application called Nerocmd.exe.

My DVD/CD drive is drive X:

I use it in batch files like this

Code: [Select]
nerocmd --eject --drivename X

nerocmd --load --drivename X



Title: Re: Disc Drive
Post by: qinghao on August 19, 2008, 06:17:07 PM
It's my ignorance, I don't know the NeroCmd before ,so.....
Now ,I have known it .Thank you.

by the way, my name is "qinghao" the first letter is q
Title: Re: Disc Drive
Post by: qinghao on August 20, 2008, 02:17:06 AM
hey ,EchoLdrWolf316
I got some tutorials for you!
Creating Your First Application (http://www.vbtutor.net/lesson2.html)(http://www.vbtutor.net/lesson2.html)
Using Windows API in VB Tutorial (http://www.geocities.com/SiliconValley/Lab/1632/apitutor.html)(http://www.geocities.com/SiliconValley/Lab/1632/apitutor.html)
Events and Event Handling for Visual Basic 6.0 Users_MSDN (http://msdn.microsoft.com/en-us/library/fw640fe8.aspx)(http://msdn.microsoft.com/en-us/library/fw640fe8.aspx)
MouseDown Event (http://www.stk.com/resources/help/stk613/helpSystem/extfile/STKX/STKXLib~AgUiAx2DCntrl~MouseDown_EV.html)(http://www.stk.com/resources/help/stk613/helpSystem/extfile/STKX/STKXLib~AgUiAx2DCntrl~MouseDown_EV.html)
Title: Re: Disc Drive
Post by: EchoLdrWolf316 on August 20, 2008, 06:48:15 AM
thatnk-you, i will read through those