What is Autorun.inf?
You can see the autorun.inf file in Pendrive or the computer drive. It’s not a virus. This file contains an automatic executable setup file and some other information related to your device. When you insert the pen drive into a USB slot, the first window executes this autorun file. Windows works according to the instructions of the autorun file. You can also find the autorun.inf file in your C drive. For example, your CD / DVD drive software must contain an autorun file to perform the function automatically.
Windows first executes the autorun.inf file. For this reason, the attacker places the virus in this file so that they can spread the virus easily to the entire system.
Can I delete autorun.inf files?
Yes. You can delete autorun.inf file. Nothing will happen to Pendrive or your computer if you delete the autorun file when you delete the autorun.inf file from Pendrive, Windows won’t automatically open Pendrive. Of course, you can access the pen drive files by going to my computer. It is good practice to remove autorun.inf file from pen drive.
How to Remove Autorun Virus from Computer |
You cannot remove the autorun virus manually. Because of autorun.inf file can contain system, hidden, archive, and read-only properties.
When you want to delete any of the four attributes, you first need to remove those attributes from the file. You can change file properties by using the command prompt.
Here I will show you the possible methods to remove autorun virus from pen drive or PC.
Method 1: Create a duplicate autorun.inf file
This method can 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 existing automatic files. Click Yes. Now you have replaced the autorun file with an empty autorun.inf file. You are currently virus free.
The latest version of Windows will not overwrite an existing file. Instead, it creates a file with the title autorun (2) .inf.
Method 2: Uninstall autorun virus using command prompt
This is the best method to remove any virus, including autorun.inf file.
Insert the pen drive into the USB slot. Just go to my computer and note your pen drive letter (C or D or E or F or G). Just see the below screenshot. This is drive ‘G’, which is my Pendrive drive letter.
Run command prompt as administrator. For older versions of Windows, follow the steps below.
Go to Start -> go RUN -> type cmd and click OK -> Right-click on Command Prompt and select “ Run as Administrator. You will see a command prompt window.
Type G: and press enter
Type attrib-h -s -r -a *. * And press Enter
This command will remove hidden, system, read-only, and archiv properties from all files in drive ‘G’. You can also use attrib-h -s -r – a autorun.inf to remove attributes only from autorun.inf file.
Now type del autorun.inf and press Enter; it will delete the file. You can also manually delete autorun files.
If you get any problem with 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 resolve this issue, reboot the system in safe mode if you don’t know how to start the system in safe mode.
Open your pen drive. Delete autorun file. You can easily delete files in safe mode. Suppose you cannot delete the file. Right-click on the autorun.inf file -> Click ” Properties ” -> Go to ” Security ” -> and adjust the access to ” EVERYONE “.
Now restart your computer in normal mode and apply attrib and del commands shown in method 2.
Still, if you see the problem, then go for the next step.
Method 4: Use Winrar and sdformatter
Open your pen drive with Winrar. Copy all the files from the drive pen to your computer by autorun.inf in pen drive. Pendrive format. You can use sdformatter to format pen drive instead of formatting windows preferences. Because this software even deletes viruses from your pen drive.
Thanks for reading my tutorial on Autorun Virus Remove from pen drive or PC. If you like it, do me by sharing it with your friends.