Sunday, April 15, 2012

Open and close the dvd-rom with notepad


  1. First open a notepad
  2. copy and paste these codes to it.          
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
colCDROMs.Item(i).Eject
Next ' cdrom
End If

     3. save notepad as .vbs file. ex- dvdrom.vbs
     4. now double click the created file.

1 comment: