Computer Hope
Microsoft => Microsoft DOS => Topic started 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?
-
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
-
prank? first remote shutdown, now open/close cd drive?
-
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.
-
Why.........?
I know exactly what Dias is talking about...I've had hands-on experience...........
-
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.
-
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
-
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?
-
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....
-
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?
-
:-\
....................
Try google ;D
-
lol,, ok
-
Do you have Nero Burning ROM installed on the machine?
-
Do you have Nero Burning ROM installed on the machine?
??? I have a CD burner
-
Do you, or don't you, have a CD burning package called Nero Burning ROM?
-
no
-
That's a shame, because it comes with a command line app which can open and shut the CD drive tray.
-
oh
-
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...
-
:) :P
-
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
nerocmd --eject --drivename X
nerocmd --load --drivename X
-
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
-
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)
-
thatnk-you, i will read through those