This VBS Script opens the CD tray on a computer, waits 4 seconds, then closes the CD tray. This program should run on any computer running microsoft windows version Windows 98 or newer.
There are more VBS Scripts on the VBS Scripts page.
- Set oWMP = CreateObject("WMPlayer.OCX.7" )
- Set colCDROMs = oWMP.cdromCollection
- colCDROMs.Item(1).Eject 'open cd tray'
- WScript.Sleep 4000 'wait 4 seconds'
- colCDROMs.Item(1).Eject 'close cd tray'