Interesting Techniques Tips Tricks Windows OS

How to eject CD drive from a .vbs file or from PowerShell

This time I have taken for you some coding concepts. Many times we find that we need to eject the CD drive but we couldn't because either the switch to open it has been broken or the system has been hanged. But here is a very easy trick to open CD drive just by a single click.

Trick-1 with .vbs

Open a notepad and paste the following code in it.

Save the file as .vbs extension.
Now double click the file to see what happens.

Trick-2 (For windows 7 only)

Just open Windows PowerShell (to open it you can type PowerShell in start menu).
Copy the following code.

Right click on the title bar at the top. Go to Edit → Paste
Now press enter to execute and see what happens.

You will definitely like to see how to reveal the hidden files using command prompt

Leave a Reply

Your email address will not be published. Required fields are marked *