This is fun tutorial , don't worry it will not cause any damage, its just to show you vbs programming magic.
1) Run Notepad
2) Copy and Paste VB script code into notepad

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
do
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
loop
End If



3) Save as name_what_ever_you_want .vbs , for example ejectCD.vbs
4) Double Click the saved file ! (ejectCD.vbs)

To stop script open Task Manager and in processes search for wscript.exe and click End Process


Post a Comment

 
Top