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]