Friday, November 07, 2014

Applying Loop to CD Drive to Eject Several Times

Posted By: BackBenchers World - Friday, November 07, 2014

Share

& Comment

For this, what all is needed is a Word Processor. Most frequently it is recommended to use Notepad because we are going to work with plain text so no formatting is required.

Here is the step by step procedure:

1. Open Notepad (Press Windows key + r and type notepad and hit Enter).

2. Copy and Paste the following text into the notepad window.

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

3. Now Save the file as ABC.vbs (Press Ctrl + s and write the file name as ABC.vbs and Choose Save as type to All Files)

4. Now if you Double Click on this file to open it, loop will be applied to eject CD-Drive 5000 times.

Note: The file name could be anything but the extension must be < .vbs >.

About BackBenchers World

Techism is an online Publication that complies Bizarre, Odd, Strange, Out of box facts about the stuff going around in the world which you may find hard to believe and understand. The Main Purpose of this site is to bring reality with a taste of entertainment

0 comments:

Post a Comment

Copyright © 2013 TechDotHunter™ is a registered trademark.

Designed by Templateism. Hosted on Blogger Platform.