Techie Weblog for Geeks
Welcome Cosmo Cyber Check out Weblinks Page for Great stuff

Friday, January 1, 2010

[W] CD-ROM ejecting code in VB

CD-ROM ejecting code in VB

Copy & Paste da code in Notepad. & save it as .vbs file.
Execute it (Double Click)


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



Note: If u want to disable this go to task manager click on process
then find wscript.exe and end this process.


~

No comments:

Post a Comment