Have you ever heard about Autorun.inf file? This is one of the executable files which will run first when you insert Pendrive into the Windows system. The problem with this autorun file is, it gives more chance to attackers for hacking. So there is more chances that the autorun files in your system have virus in them. So you need to delete virus from Autorun file.
It is very easy to Remove autorun virus from your pen drive or from your PC. In this tutorial, I am going to cover possible methods to Remove the autorun virus.
Table of Contents
What is Autorun.inf file or Autorun Virus?
You may see autorun.inf file in your pen drive or in your PC drives. It is not actually a virus. This file has an auto executable setup file and some other information related to your device. When you insert the pen drive into the USB slot, windows first execute this autorun file. Windows works according to the guidance given by the autorun file. You can find autorun.inf file in your ‘C’ drive also. For example, your CD/DVD drive software must contain an autorun file to execute functions automatically.
Windows first execute autorun.inf file. Because of this reason, attackers place viruses in this file, so that they can spread viruses easily to the entire system. Most attackers place worm viruses in autorun.inf file.
Can I delete autorun.inf file?
Yes. You can delete autorun.inf file. Nothing will happen to your pen drive or PC if you delete the autorun file. When you delete autorun.inf file from pen drive, Windows will not open the pen drive automatically. Of course, you can access pen drive files by going into my computer. It is good practice to remove autorun.inf file from the pen drive.
How to Remove autorun virus from Pendrive or PC?
We provided this article in the form of a video tutorial for our reader’s convenience. If you are more interested in reading, then watch it after the completion of reading.
You can not remove the autorun virus manually. Because of autorun.inf file may contain system, hidden, archive, and read-only attributes.
When you want to delete any file which has any one of these four attributes, first you need to remove those attributes from the file. You can change file attributes by using the command prompt.
Here I am going to show you possible methods to remove the autorun virus from a pen drive or PC.
Method 1 : Create Duplicate autorun.inf file
This method may work for older versions of Windows. It will not work in the latest versions. If you have the latest version, you can skip this method.
Insert your pen drive into the USB slot. Open pen drive. Right-click on space. Create a new empty text document with the name “autorun.inf”. Save the document, it will ask you to replace the existing autorun file. Click yes. Now you have replaced the virus autorun file with an empty autorun.inf file. You don’t have a virus now.
The latest version of Windows will not overwrite the existing file, instead, it creates a file with file name autorun(2).inf.
Method 2: Remove autorun virus by using a command prompt
It is the best method to remove any type of virus including autorun.inf file.
Insert the pen drive into the USB slot. Just go to my computer and note down your pen drive’s drive letter (C or D or E or F or G). Just see the below screenshot, here ‘G’ drive is my pen drive’s drive letter.
Run command prompt as administrator. You can see How to run cmd as admin in windows 8 and windows 10. For the older version of Windows, follow the below procedure.
Go to start -> Go to Run -> Type cmd and hit OK -> Right-click on Command Prompt and select “Run as Administrator. You will see the command prompt window. Type,
Type G: and press enter
Type attrib -h -s -r -a *.* and press enter
This command removes hidden, system, read-only, and archive attributes from all the files in the ‘G’ drive. You can also use attrib -h -s -r -a autorun.inf to remove those attributes only from autorun.inf file.
Now type del autorun.inf and press enter it will delete the file. You can also manually delete the autorun file.
If you get any problem in this method, you can try the next method.
Method 3 : Delete autorun file in safe mode
Sometimes you may get an “access denied” error after trying the “attrib” command.
To solve this problem, just restart your system in safe mode. If you don’t know how to start the system in safe mode.
Open your pen drive. Delete the autorun file. You can easily delete the file in safe mode. If you can not delete the file. Right-click on autorun.inf file -> Click “Properties” -> Go to “Security” -> and Edit access permissions to “EVERYONE”.
Now restart your PC in normal mode and apply the attrib and del command shows that in method 2.
Still if you see problem, then go for next step.
Method 4 : Use WinRar and SD Memory Formatter
Open your pen drive with WinRAR. Copy all files from the pen drive to your computer by leaving autorun.inf in the pen drive. Format the pen drive. You can use SD Memory Formatter to format the pen drive instead of the window format option. Because this software even clears the virus from your pen drive.
We suggest you use AVG Internet Security Unlimited(20% discounted link) to protect your PC from all types of viruses.
- Read: How to format USB | Tip to remove virus completely
- 2 Simple methods to remove adware from PC, chrome & mozilla
- How to remove malware from a computer with a free tool
Thanks for reading my tutorial about Remove autorun virus from Pendrive or PC. If you like it do me favor by sharing it with your friends. You can also follow whatvwant on Facebook and Twitter. Subscribe to whatVwant channel on YouTube for regular updates.