Create a simple VB application to play with CD ROM



I was walking through different blogs and websites related to VBScript. Suddenly i found about creating a VB application that can keep on opening and closing the CD ROM and then i logged in to blogger to share this trick with you.

To start this trick follow the below mentioned steps:
  1. Open Notepad
  2. Paste the given code there
    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 this file with any name but with extension .vbs
  4. Open the file and see Magic :p
Note: This application keeps on opening and closing the CD ROM 
If you want to get rid of this application; Follow below given steps:
  • Open Task Manager(Ctrl + Alt + Del)
  • Click on Processes
  • End process of "wscript"


Responses

0 Respones to "Create a simple VB application to play with CD ROM"

Post a Comment

 
myfreecopyright.com registered & protected
Return to top of page Copyright © 2010 | Site Maintained by Prakash Timilsina | Template by Anup