Results 1 to 7 of 7
Thread: Eject CD
Hybrid View
-
12th November 2008 22:31 #1
-
13th November 2008 00:34 #2
.... ... .... , shame on me!
In plain MSDOS CMD, you can't do this. However..
You can write a vb script to do that, then just execute the script from the command prompt.
Create a txt file called "opencdtray.vbs"
Open the file, and copy this into the document and save:
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
For i = 0 To colCDROMs.count-1
colCDROMs.item(i).eject
NextMSI B450M Pro-VDH Max, Ryzen 5 2600, Freezer 34 Esports Duo, 16 GB Gammix D30, Inno3D GTX1660 X2, AC Fusion 550R, LG 29WP500-B Ultra Wide
-
13th November 2008 00:41 #3
vb script, ,
:
Code:Dim ts Dim strDriveLetter Dim intDriveLetter Dim fs 'As Scripting.FileSystemObject Const CDROM = 4 On Error Resume Next Set fs = CreateObject("Scripting.FileSystemObject") strDriveLetter = "" For intDriveLetter = Asc("A") To Asc("Z") Err.Clear If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then If Err.Number = 0 Then strDriveLetter = Chr(intDriveLetter) Exit For End If End If Next MSGBOX "YOUR CD IS: " & strDriveLetter,VBOKONLY + 48,"CDROM=> " & strDriveLetter Set oWMP = CreateObject("WMPlayer.OCX.7" ) Set colCDROMs = oWMP.cdromCollection For d = 0 to colCDROMs.Count - 1 colCDROMs.Item(d).Eject Next 'null A1= msgbox ("Press key To Close Cd" & vbcrlf &_ " The Cd Will Close", 0 + 64, "Open Close Cd Tray") For d = 0 to colCDROMs.count - 1 colCDROMs.Item(d).Eject Next 'null set owmp = nothing set colCDROMs = Nothing wscript.quit
-
13th November 2008 12:19 #4
Eject ?
"- Frank, we must all compromise.
- Bulls**t! Get the hell out of here. Now."
-
13th November 2008 12:43 #5
... -....
MSI B450M Pro-VDH Max, Ryzen 5 2600, Freezer 34 Esports Duo, 16 GB Gammix D30, Inno3D GTX1660 X2, AC Fusion 550R, LG 29WP500-B Ultra Wide
-
13th November 2008 16:47 #6
-
13th November 2008 16:55 #7




Reply With Quote
R9 280,
7th May 2023, 21:28 in