3 Steps To Protect Computer From Autorun Virus – No software

Protect computer from Autorun virus

Autorun virus uses autorun.inf to run and execute harmful scripts that cause windows errors. they spread commonly through USB flash disks and external hard disks and once your PC got infected, it will copy this virus to any removable device connected to this PC as long as it has access to do. The following lines will show how to protect your computer from autorun virus without using any additional software.

Step one: Change Windows AutoPlay Policies

  1. Open windows RUN dialog by pressing (windows logo + R) or by search in start menu, then run “gpedit.msc”


  2. Go to Computer Configuration > Administrative Templates > Windows Components > AutoPlay Policies


  3. Go to “Turn off Autoplay” > change to enabled for all drives


  4. Go to “Turn off Autoplay for non-volume devices” > change to enabled


  5. Go to “”Default behavior for AutoRun” > change to enabled and Do not execute any autorun commands


Step two: Disable running autorun.inf files

Open command prompt (CMD) and execute the following command:
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf" /ve /d "@SYS:DoesNotExist"

This command tells Windows “whenever you handle autorun.inf, don’t use the values in the file but instead use the values at  “HKEY_LOCAL_MACHINE\SOFTWARE\DoesNotExist” and because this key doesn’t exist, it’s as if autorun.inf is empty. So nothing is added to the explorer double-click action.


Step three: Create dummy autorun.inf and recycler

Open command prompt (CMD) and execute the following commands for all drives including USB disks (in this example drive is C:\):
mkdir \\.\\c:\autorun.inf\nul.Knowit-Now
attrib +s +h +r c:\autorun.inf
echo Knowit-now.com> c:\recycler
attrib +s +h +r c:\recycler

These commands create a folder named autorun.inf and a file named recycler and change their attributes  to (system, read only and hidden files).



Video Tutorial

Useful Links

If you don’t have it, Check the below links:

Sharing is caring!

No Responses

  1. Know It Now

Leave a Comment