Secure Windows: Disable Autorun for USB Flash Drives


You can help to make computers more secure! How? By disabling autorun on all of your own USB flash drives! Viruses will modify the autorun.inf file in order to execute malicious code on your PC.

Disable autorun in Windows 7

So, how do you disable autorun then and check if you are infected?

1. Open an elevated command prompt
2. Enter the driver letter of your USB flash drive, e.g. G:
3. Next, enter attrib -h -r -s autorun.inf

If you receive the message: File not found – autorun.inf your antivirus might have already deleted/quarantined your autorun.inf because it was infected.

Autorun.inf not found

If the system does find the autorun.inf, proceed with the next stepos.

This command will make the file visible again and we can then proceed and delete the autorun.inf

4. Before you delete it run edit autorun.inf
5. Look for “open=file.exe
6. The file.exe will have a random name and is the actual virus file that the autorun.inf is launching every time you plug in your USB flash drive. That’s how viruses can easily spread.
7. To delete the virus enter del /f /a file.exe . Replace file.exe with the virus filename.
8. Also don’t forget to delete the autorun.inf. Enter del /f /a autorun.inf

Rate this article:
This article was rated 5 out of 5 stars
Based on 1 ratings

How to Monitor Computer Activity
How to remove jusched.exe and should I?
Privacy in 2013: Adware Tracking Cookies – What They Are and What They Do

Juicy Logo White You love Windows, Gaming and everything digital? Great, we too! We have thousands of great Windows 7 themes, registry tweaks, tutorials, so please use our search box if you look for anything specific.

If you have some awesome desktop themes, tips or want to write for us, then drop us a mail!



Written by: Oliver Krautscheid
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common e.... Full Bio

Contact The Author: Get Free Help.png

Connect:

facebook google twitter LinkedIn


Need help? Ask a question at our QA site, click the red button to get started:

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>