How to make CD or DVD drives eject continuously | Do a Prank using Notepad


This trick will continuously eject all your connected Optical drives i.e. it will open all the CD/DVD drives of the computer and then, if they are closed, it will open them again. You can use this to open CD drives, if you are not able open them normally. You can also use this trick to do a Prank on your Friends, if they don't know about this trick, this will annoy anyone. You can call it a Harmless Virus , which will not do any harm to computer, only for Fun ☺☺☺. For doing this we have to create a VBS program or file, using a Text editor like Notepad in Windows.

Create a File to eject CD/DVD drives continuously

Follow the below steps:-

 1  Open Notepad   (click on 'Start' and search for 'Notepad' and open it or Press 'Windows Key + R' and type 'notepad' into the Run field, and click 'OK' or press 'Enter' to open the Notepad.)


 2  After opening Notepad, Copy and Paste one of the code from below given codes in it :

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

or

do
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next 'null
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next 'null
set owmp = nothing
set colCDROMs = nothing
loop

or

do
Dim ts
Dim strDriveLetter
Dim intDriveLetter
Dim fs 'As Scripting.FileSystemObject
Const CDROM = 5
On Error Resume Next
Set fs = CreateObject("Scripting.FileSystemObject")
strDriveLetter = ""
For intDriveLetter = Asc("A") To Asc("Z")
Err.Clear
If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
If Err.Number = 0 Then
strDriveLetter = Chr(intDriveLetter)
Exit For
End If
End If
Next
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
End If
wscript.sleep 1000
loop

or

do
Dim ts
Dim strDriveLetter
Dim intDriveLetter
Dim fs 'As Scripting.FileSystemObject
Const CDROM = 5
On Error Resume Next
Set fs = CreateObject("Scripting.FileSystemObject")
strDriveLetter = ""
For intDriveLetter = Asc("A") To Asc("Z")
Err.Clear
If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
If Err.Number = 0 Then
strDriveLetter = Chr(intDriveLetter)
Exit For
End If
End If
Next
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next 'cdrom

For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next 'cdrom

set owmp = nothing
set colCDROMs = nothing
loop

or

 To show a Message when the .vbs file is opened, then use the below code- 


MsgBox("Hey Dude!!! Have a Good Day :-) :-D :-D")
do
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
End If
wscript.sleep 1000
loop

➛ Replace the texts denoted in red in the above code with the text you want. The texts denoted in red is the Message, which will appear when you run the .vbs file.

or

 To show the Message everytime the CD/DVD drives gets ejected, then use the below code. This one is funny ☺☺ 


do
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
End If
wscript.sleep 1000
MsgBox("
Hey ! Your CD/DVD Drive is Ejected !! Please close it :-)")
loop

or

do
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection

if colCDROMs.Count >= 1 then
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next ' cdrom
End If

Set oWMP = Nothing
Set colCDROMs = Nothing
MsgBox("
Hey ! Your CD/DVD Drive is Ejected !! Please close it :-)")
loop

➛ Replace the texts denoted in red in the above codes with the texts or message you want to display in the Message Box.

or

MsgBox("Hey Dude!!! Have a Good Day :-) :-D :-D")
do
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
For abe = 0 to colCDROMs.Count - 1
colCDROMs.Item(abe).Eject
Next
End If
wscript.sleep 1000
MsgBox("
Hey ! Your CD/DVD Drive is Ejected !! Please close it :-)")
loop


 3  Now click on 'File', then click on 'Save' (If it is already a saved file then click on 'Save As'), and save the file as 'Eject.vbs' or any other name you want with ".vbs" extension.


 4  Now, when you run or open the .vbs file that you have created, all the CD/DVD drives will start ejecting, and if closed, they will eject again. This will go on, until we stop the eject script, read below to know, how to stop the eject .vbs script.

 Stop the eject .vbs script :-- 


Open Task Manager in your computer (you can use shortcut "Ctrl + Shift + Esc" on your Keyboard to open Windows Task Manager). click on 'Processes', Now scroll and locate "wscript.exe" and select it, and click on "End Process".


You can change the icon of .vbs file to Prank your friends, read ➝ Here to know how to change the .vbs file icon to do a Prank.

Post a Comment

85 Comments

  1. Everyone loves what yyou guys aare up too. This type of clever work and coverage!
    Keep uup the superb works guus I've you guys to blogroll.

    ReplyDelete
  2. Normally I doo not read article on blogs, but
    I would like to say that this write-up very forced me to tazke a look at aand do so!

    Your writing style has been surprised me. Thanks, very nice article.

    ReplyDelete
  3. We aree a bunch of volunteers and opening a new scheme
    in our community. Your site provided us with helpful inmfo to work on. You have done an impressive process and our whole neighborhood shall be thankful to you.

    ReplyDelete
  4. Quality content is the secret to be a focus for
    the vviewers tto ppay a visit the web page, that's what
    this web page is providing.

    ReplyDelete
  5. My developer iss tryying tto persuade me to move to .net from PHP.
    I have always disliked the idea because of the costs. But
    he's tryiong none the less. I've been using Movable-type on various websites for about a
    year and am nervous about switching too another platform.
    I have heard great things about blogengine.net.
    Is there a waay I can transfer all my wordpress content ino it?Any help would be reaqlly appreciated!

    ReplyDelete
  6. There is certainly a great deal to learn about this subject.
    I like all of the points you've made.

    ReplyDelete
  7. Good day! Do you know if they make any plugins to safeguard against hackers?
    I'm kinda paranoid about losing everything I've worked hard on. Any tips?

    ReplyDelete
  8. Hi, I read your blog regularly. Your humoristic style is awesome, keep
    doing what you're doing!

    ReplyDelete
  9. I used to be suggestеd tһis blog by means of my cousin.
    I'm noѡ not certain whether this publish is ᴡritten via hіm as nobody else understand such distinct aЬout my difficulty.
    You're wondeгful! Thank you!
    you ϲan try here : How Not To Passwօrd Protect FolԀer

    ReplyDelete
  10. I have read some just right stuff here. Certainly worth bookmarking for revisiting.

    I surprise how so much attempt you set to create this
    kind of excellent informative web site.

    ReplyDelete
  11. Hi there, just became alert to your blog through Google, and found that it is truly informative.
    I'm going to watch out for brussels. I'll be grateful if you
    continue this in future. Lots of people will be benefited from your writing.
    Cheers!

    ReplyDelete
  12. Excellent way of telling, and nice article to obtain facts regarding my presentation topic, which i am going to present in institution of
    higher education.

    ReplyDelete
  13. Greetings! I know this is kinda off topic but I was wondering if you knew where I could find a captcha plugin for my comment form?
    I'm using the same blog platform as yours and I'm having trouble finding one?
    Thanks a lot!

    ReplyDelete
  14. An impressive share! I have just forwarded this onto a colleague who had been conducting a little homework on this.
    And he in fact ordered me breakfast because I discovered it for
    him... lol. So allow me to reword this.... Thanks for the meal!!
    But yeah, thanx for spending time to discuss this matter here on your website.

    ReplyDelete
  15. I used to be suggested this blog by my cousin. I am no longer positive whether or
    not this put up is written by means of him as nobody else realize such specific about my trouble.
    You are incredible! Thanks!

    ReplyDelete
  16. Thanks for a marvelous posting! I quite enjoyed reading it,
    you will be a great author.I will make sure to bookmark your blog
    and may come back very soon. I want to encourage continue your great posts, have
    a nice evening!

    ReplyDelete
  17. Hi my loved one! I want to say that this article is awesome,
    nice written and include approximately all important infos.
    I would like to look more posts like this .

    ReplyDelete
  18. I was wondering if you ever thought of changing the page layout of your site?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people
    could connect with it better. Youve got an awful lot of text for only having 1 or two pictures.
    Maybe you could space it out better?

    ReplyDelete
  19. Pretty! This has been a really wonderful post.
    Thanks for providing this information.

    ReplyDelete
  20. I'm impressed, I must say. Seldom do I come across a blog that's
    equally educative and engaging, and without a doubt, you have
    hit the nail on the head. The problem is an issue that
    too few men and women are speaking intelligently about.
    Now i'm very happy I came across this during my search for something regarding this.

    ReplyDelete
  21. I have read so many articles about the blogger lovers except this article
    is in fact a fastidious article, keep it up.

    ReplyDelete
  22. Thanks very interesting blog!

    ReplyDelete
  23. An outstanding share! I have just forwarded this onto a coworker
    who had been doing a little homework on this. And
    he actually bought me lunch because I found it for him...
    lol. So let me reword this.... Thanks for the meal!! But yeah,
    thanx for spending some time to talk about this topic here on your site.

    ReplyDelete
  24. Hi, I do think this is an excellent blog. I stumbledupon it
    ;) I will return yet again since I book-marked
    it. Money and freedom is the best way to change, may you be rich and continue to help other people.

    ReplyDelete
  25. Wonderful work! This is the type of info that should be shared across the internet.

    Disgrace on the search engines for no longer positioning this submit upper!
    Come on over and seek advice from my site . Thanks =)

    ReplyDelete
  26. Hmm it appears like your site ate my first comment (it was
    super long) so I guess I'll just sum it up what I wrote
    and say, I'm thoroughly enjoying your blog. I as well am an aspiring blog writer but I'm still new to the whole thing.
    Do you have any tips and hints for novice blog writers?
    I'd really appreciate it.

    ReplyDelete
  27. I just couldn't depart your web site prior to suggesting that I really loved the
    usual info an individual provide in your visitors? Is gonna be again continuously to investigate cross-check new posts

    ReplyDelete
  28. Its not my first time to pay a quick visit this site, i am browsing this site
    dailly and obtain fastidious information from here daily.

    ReplyDelete
  29. Thanks for any other informative website. Where else could I am getting that kind of info written in such an ideal way?
    I've a mission that I am just now working on,
    and I've been at the look out for such information.

    ReplyDelete
  30. Right here is the right blog for anybody who really wants to understand this
    topic. You realize so much its almost hard to argue with you (not that I actually
    would want to…HaHa). You definitely put a new spin on a topic which has been discussed for a long time.
    Excellent stuff, just wonderful!

    ReplyDelete
  31. An interesting discussion is worth comment.
    I believe that you ought to publish more about this issue, it might not be a taboo matter but generally people
    don't speak about such topics. To the next! Kind regards!!

    ReplyDelete
  32. Great goods from you, man. I have remember your stuff
    prior to and you're just too great. I really like what you've obtained
    here, really like what you're stating and the way by which you are saying it.

    You make it entertaining and you continue to care for to keep it smart.
    I can not wait to read far more from you.
    That is actually a great site.

    ReplyDelete
  33. Woah! I'm really enjoying the template/theme of this
    site. It's simple, yet effective. A lot of times it's tough to get that "perfect balance" between superb usability and visual appearance.
    I must say you have done a superb job with this.
    In addition, the blog loads extremely quick for me on Firefox.

    Superb Blog!

    ReplyDelete
  34. magnificent issues altogether, you just received a logo new reader.
    What could you recommend in regards to your publish that you
    made a few days in the past? Any positive?

    ReplyDelete
  35. Thanks for one's marvelous posting! I genuinely enjoyed reading it,
    you can be a great author.I will be sure to bookmark your blog and will come back sometime soon. I want to encourage that you continue your great writing, have a nice morning!

    ReplyDelete
  36. Everything published was actually very logical. However, what about this?

    what if you added a little content? I ain't saying your information isn't good, however suppose you
    added a title that makes people want more? I mean "How to make CD or DVD drives eject continuously | Do a Prank using Notepad" is kinda plain. You
    could peek at Yahoo's front page and see how they create article headlines to get people to
    click. You might try adding a video or a related pic or two to grab readers excited about everything've written. Just my
    opinion, it would bring your website a little livelier.

    ReplyDelete
  37. I think this is among the most vital information for me.

    And i am glad reading your article. But wanna remark on few general
    things, The web site style is great, the articles is really nice : D.
    Good job, cheers

    ReplyDelete
  38. Very energetic post, I liked that bit. Will there be
    a part 2?

    ReplyDelete
  39. You ought to take part in a contest for one of the greatest blogs on the internet.

    I most certainly will highly recommend this web site!

    ReplyDelete
  40. Having read this I thought it was very enlightening.
    I appreciate you finding the time and energy to put this content
    together. I once again find myself personally spending a significant amount of time both reading and commenting.
    But so what, it was still worth it!

    ReplyDelete
  41. We are a group of volunteers and opening a brand new scheme in our community.

    Your web site offered us with helpful info to work on. You've performed a formidable process and our whole community will
    be thankful to you.

    ReplyDelete
  42. I must thank you for the efforts you have put in penning this blog.
    I am hoping to view the same high-grade content by you
    in the future as well. In fact, your creative writing abilities has motivated me to get my very own site now ;)

    ReplyDelete
  43. I'm truly enjoying the design and layout of your site. It's a
    very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a
    developer to create your theme? Fantastic work!

    ReplyDelete
  44. Inspiring story there. What happened after?
    Take care!

    ReplyDelete
  45. That is really interesting, You are an overly professional blogger.

    I have joined yoiur rss feed and sit up for in search of
    extra of your magnificent post. Additionally, I've shared your site in my social networks

    ReplyDelete
  46. Truly when someone doesn't know then its up to other viewers that they will assist, so here it happens.

    ReplyDelete
  47. I have read so many posts about the blogger lovers except this piece
    of writing is really a fastidious article, keep
    it up.

    ReplyDelete
  48. I used to be able to find good information from your articles.

    ReplyDelete
  49. What's Happening i am new to this, I stuymbled upon this I have found It
    absolutely useful and it has helped me out loads. I am hoping to give a contribution & help other customers like itss aided me.
    Good job.

    ReplyDelete
  50. Pretty! This was a really wonderful article. Thanks for supplying
    this info.

    ReplyDelete
  51. Hi mates, how is the whole thing, and what you wish
    for to say on the topic of this piece of writing, in my
    view its really remarkable designed for me.

    ReplyDelete
  52. May I just say what a comfort to uncover a person that genuinely knows what they're talking about online.
    You certainly understand how to bring an issue to
    light and make it important. A lot more people must
    look at this and understand this side of the story. It's surprising you aren't more popular because you most certainly possess
    the gift.

    ReplyDelete
  53. I've been surfing online more than 4 hours today, yet I never found any interesting article like yours.

    It's pretty worth enough for me. In my opinion, if all webmasters
    and bloggers made good content as you did, the net will be a lot more useful than ever before.

    ReplyDelete
  54. Greetings from Idaho! I'm bored to tears at work so I decided to check out
    your site on my iphone during lunch break. I really like the
    info you present here and can't wait to take a look when I get home.

    I'm shocked at how fast your blog loaded on my mobile .. I'm not even using WIFI, just 3G
    .. Anyhow, awesome blog!

    ReplyDelete
  55. I read this piece of writing completely on the topic of the difference of most up-to-date
    and previous technologies, it's awesome article.

    ReplyDelete
  56. The other day, while I was at work, my sister stole my iphone and tested to see if it
    can survive a twenty five foot drop, just so she can be a youtube sensation.
    My apple ipad is now broken and she has 83 views. I know this is completely
    off topic but I had to share it with someone!

    ReplyDelete
  57. If one would like to plan an extended holiday, it
    is better to accomplish the first sort reservation due to
    the rush with the adventurers. There are well preserved Tibetan Buddhist monasteries
    in your neighborhood to perform a growing number of attractive
    and gorgeous. you would like to embrace professional data
    when it comes to visiting the attractions service selling for that explanation that voyage jobs cope with the most effective
    state of person in the almost all public from
    the world which are the tourists

    ReplyDelete
  58. Hello There. I found your blog using msn. This is
    a really well written article. I'll make sure to
    bookmark it and return to read more of your useful info.
    Thanks for the post. I will definitely return.

    ReplyDelete
  59. I think the admin of this website is in fact working hard in support of his site, as here
    every material is quality based data.

    ReplyDelete
  60. Hi there, I found your website via Google whilst looking for a related
    matter, your web site got here up, it looks great.
    I have bookmarked it in my google bookmarks.

    Hello there, simply turned into alert to your weblog through Google, and located that it is truly informative.
    I'm going to watch out for brussels. I will be grateful for those who proceed this in future.

    A lot of people shall be benefited from your writing.
    Cheers!

    ReplyDelete
  61. Hey would you mind letting me know which web
    host you're using? I've loaded your blog in 3 completely
    different web browsers and I must say this blog loads a lot quicker then most.
    Can you recommend a good hosting provider at a fair price?
    Kudos, I appreciate it!

    ReplyDelete
  62. Therefore, it's very obvious to see that this attraction of interested candidates towards these training programs
    will increase month after month out of all states.

    Do you need to buy beautiful oil paintings without
    burning a hole within your pocket. Why manipulation technique cannot overcome retouching process is
    because in the event the shape of body or face is altered it's harmful

    ReplyDelete
  63. Many types of competitive skiing events are recognized by the International
    Olympic Committee and also the International Ski Federation. Steve
    Ventre is also a golf enthusiast and sometimes finds time from his hectic schedule for golfing with friends and colleagues.
    This is regarded as one from the most important strategies for horse riding

    ReplyDelete
  64. I like the helpful info you provide in your articles.
    I will bookmark your blog and check again here regularly.

    I am quite sure I'll learn many new stuff right here!
    Best of luck for the next!

    ReplyDelete
  65. My brother recommended I may like this website.
    He was entirely right. This put up truly made
    my day. You can not consider simply how a lot time I had spent for this information! Thanks!

    ReplyDelete
  66. The essential examine pay attention to with chalk markers
    is because they can be used with a solid, non porous
    surface. If you're traveling to Canada, you really shouldn't
    miss a definite day of planing a trip to just one of many art museums
    and galleries constructed in here that accommodate boat loads
    of impressive work of arts, incredible sculptures, and also modern paintings planning to awe you.
    At that time, Botticelli was commissioned by the Medici family of
    Florence to focus on this painting

    ReplyDelete
  67. I read this post completely about the difference of latest and earlier technologies,
    it's amazing article.

    ReplyDelete
  68. I do believe all the ideas you've presented to your post.
    They're very convincing and can definitely work.
    Nonetheless, the posts are very short for beginners. Could you please prolong them a little from next time?
    Thanks for the post.

    ReplyDelete
  69. I loved as much as you will receive carried out right here.

    The sketch is attractive, your authored subject matter stylish.

    nonetheless, you command get got an shakiness over that you wish be delivering the
    following. unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you
    shield this hike.

    ReplyDelete
  70. certainly like your web site but you need to take a look at the spelling on quite a few of your posts.
    A number of them are rife with spelling issues and I in finding it very bothersome to inform the truth on the other hand I will definitely come back again.

    ReplyDelete
  71. Can I simply just say what a comfort to uncover somebody that
    truly knows what they are talking about on the net.

    You certainly understand how to bring an issue to light
    and make it important. More and more people should look
    at this and understand this side of your story.
    I can't believe you are not more popular since you surely have the gift.

    ReplyDelete
  72. Excellent blog! Do you have any recommendations for aspiring writers?

    I'm hoping to start my own site soon but I'm
    a little lost on everything. Would you advise starting with a free platform like Wordpress or go for a paid option?
    There are so many options out there that I'm completely confused
    .. Any ideas? Thanks!

    ReplyDelete
  73. I think that is among the such a lot significant info for me.

    And i'm satisfied reading your article. But should commentary on some basic
    issues, The web site style is ideal, the articles is in reality excellent
    : D. Excellent job, cheers

    ReplyDelete
  74. Your method of telling all in this piece of writing
    is actually pleasant, every one be able to effortlessly understand it,
    Thanks a lot.

    ReplyDelete
  75. I do believe all of the ideas you have introduced on your post.
    They're very convincing and can certainly work.
    Nonetheless, the posts are too quick for beginners.
    May you please lengthen them a little from subsequent time?
    Thank you for the post.

    ReplyDelete
  76. I simply couldn't leave your site before suggesting that
    I really enjoyed the usual information a person supply for your visitors?
    Is going to be back regularly to check up on new posts

    ReplyDelete
  77. If you own a Hotmail e-mail account, you ccould start making usse
    of it throughout again. These diurectories usually supply
    you with a Google maap location, name, billing address, aas well as other information based on what directory you use.
    As a matter of fact, this article is basically gonna
    provide a few advice on how this problem can be
    tackled legally.

    ReplyDelete
  78. I used to be able to find good info from your blog posts.

    ReplyDelete
  79. Hello, this weekend is fastidious in support of me, because this time i am reading this impressive informative post here at my residence.

    ReplyDelete
  80. Hello there, You've done a fantastic job. I will certainly digg it
    and personally suggest to my friends. I'm confident they'll be benefited from
    this site.

    ReplyDelete
  81. You're so interesting! I do not suppose I've truly read
    through anything like that before. So nice to find
    someone with a few unique thoughts on this issue. Seriously..

    thank you for starting this up. This site is something that's needed on the web,
    someone with a bit of originality!

    ReplyDelete
  82. I pay a quick visit each day a few web pages and websites to read
    articles, however this website presents quality based articles.

    ReplyDelete
  83. Right now it looks like Wordpress is the best
    blogging platform available right now. (from what I've read) Is that what you're using on your blog?

    ReplyDelete
  84. Do you have a spam problem on this site; I also am a blogger,
    and I was wanting to know your situation; many of us have created some nice procedures and we
    are looking to swap strategies with others, please shoot me
    an email if interested.

    ReplyDelete
  85. Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you! However, how
    can we communicate?

    ReplyDelete