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:
If you want to get rid of this application; Follow below given steps:
Labels:
Notepad,
VBScript
To start this trick follow the below mentioned steps:
- Open Notepad
- 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 - Save this file with any name but with extension .vbs
- Open the file and see Magic :p
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