Disabling Auto-run in windows as a security measure

I am increasingly seeing that flash memory sticks are becoming infected with a whole bunch of different types of malicious code, and seem very successful in copying to other drives, ipods, digital cameras, even memory sticks inside phones that are connected to affected systems.

Of course, you want to make sure that you are running a good and updated anti-virus program and have recently used windows update, but when you use your memory sticks in other systems, you cannot always be sure that latest patches and anti-virus exists or is up to date, and that system is not already infected. You may not know it has just infected your device until you scan it with your own system.

A simple solution to the latest type of threat is by disabling auto-run in windows on all drives, it will prevent automatic execution of such code, even if the device you connect happens to be infected with it. I now use the following code on all my systems to prevent this problem:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:000000ff
 

You can copy and paste this text above into notepad, and save the file as filename.reg on the desktop, when you double-click it, it will merge into the registry.

It works without a reboot required and with immediate effect, and does the job nicely! You need to have local administrator rights to be able to do this.

And here is a direct link to the file that you can run from my site, but you still need local admin rights for it to work:

http://www.glennroast.co.uk/disautorun.reg

 

Back to Technical Tips

Back To Main Page