dupa

Author Topic: Opening and closing DVD or CD rom drives  (Read 3565 times)

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Opening and closing DVD or CD rom drives
« on: February 25, 2006, 01:37:28 pm »
Does anyone know how to close a cd rom drive using Javascript or VB, i fund a script that will open them, however i need one that will close them if they are open

can someone help!!

Thankyou in advance

Vasilli

VB script to open CD drives

' VB Script
<SCRIPT language=VBScript>
<!--

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection

if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If

-->
</SCRIPT>

ISMAEL LEDESMA.

onthecuttingedge2005

  • Guest
Opening and closing DVD or CD rom drives
« Reply #1 on: February 25, 2006, 04:04:50 pm »
quote:
Originally posted by moreis62

Does anyone know how to close a cd rom drive using Javascript or VB, i fund a script that will open them, however i need one that will close them if they are open

can someone help!!

Thankyou in advance

Vasilli

VB script to open CD drives

' VB Script
<SCRIPT language=VBScript>
<!--

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection

if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If

-->
</SCRIPT>





Hi moreis62.

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection

don't support closing a CD-ROM.

But, I have written a script that will allow you to both open and close a CD-ROM, but doesn't use either of the above to do the job.

I'll post it a little later because my better half wants to head for the beach for awhile, see ya in a bit.

Jerry[8D]
« Last Edit: February 25, 2006, 04:07:31 pm by onthecuttingedge2005 »

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Opening and closing DVD or CD rom drives
« Reply #2 on: February 25, 2006, 11:11:31 pm »




Thanks in advance
Jerry[8D]
ISMAEL LEDESMA.

onthecuttingedge2005

  • Guest
Opening and closing DVD or CD rom drives
« Reply #3 on: February 26, 2006, 12:29:27 am »
You can download my cd-rom controller here:

http://www.zabaware.com/forum/topic.asp?TOPIC_ID=3026

Jerry[8D]

Charmzbond

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Opening and closing DVD or CD rom drives
« Reply #4 on: March 05, 2006, 04:54:23 am »
quote:
Originally posted by moreis62

Does anyone know how to close a cd rom drive using Javascript or VB, i fund a script that will open them, however i need one that will close them if they are open

can someone help!!

Thankyou in advance

Vasilli

VB script to open CD drives

' VB Script
<SCRIPT language=VBScript>
<!--

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection

if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If

-->
</SCRIPT>





Dear moreis62/whoever it may concern

I'm wondering where in hal's brain editor script can
I paste the codes you provided above (CD Rome)...or
does it even matter? I see people sharing a lot of codes
but there's no specific indication of where interested users SHOULD
paste them.