Destroy the autorun virus in USB or on PC with 4 simple ways

Because Windows will perform these autorun.inf files first, some hackers take advantage of this to install the virus into the autorun file so that it can spread the virus easily to the entire system. This article will show you how to remove autorun virus from USB or PC.

What is Autorun.inf file?

Users may have caught the autorun.inf file in USB flash drives or on a computer drive. This is not really a virus. This file has an automatic executable installation file and some other information related to the user's device. When plugging the USB flash drive into the USB slot, Windows will first execute this autorun file. Windows works according to the instructions of the autorun file. In addition, users also see these files in the computer C drive. For example, the CD / DVD drive software must contain an autorun file to perform the automatic function.

Because Windows will perform these autorun.inf files first, some hackers take advantage of this to install the virus into the autorun file so that it can spread the virus easily to the entire system. Normally they will install the worm virus, or worm, into the autorun.inf file.

  1. Differentiate viruses, trojans, worms and rootkits

Can autorun.inf files be deleted?

Yes, you can delete the autorun.inf file and not cause any problems with the USB or PC. When removing the autorun.inf file from Windows USB drive, it will not automatically open USB when plugged into the computer. Of course, you can access files in USB by clicking on My computer . This is a good way to remove autorun.inf files from USB.

Users cannot remove autorun virus manually. Because the autorun.inf file can contain system properties, hidden, stored and read-only.

Destroy the autorun virus in USB or on PC with 4 simple ways Picture 1Destroy the autorun virus in USB or on PC with 4 simple ways Picture 1

When you want to delete any autorun file that has one of the four attributes, you first need to remove the properties of these files, then change its properties using the Command prompt.

  1. Instructions for changing file attributes with the Attrib command

How to remove autorun virus from USB or PC

This article will guide you 4 ways to leave the autorun virus from USB or PC.

Method 1: Create a copy of the autorun.inf file

This method may work for older Windows versions, it will not work in the latest versions. If you are using a recent version of Windows like Windows 8 and Windows 10, skip this method.

Plug the USB into the computer slot, then open it and right-click the blank space to create a new blank text document named " autorun.inf ". When saving this file, the system will ask to replace the existing autorun files, click on Yes . You have now replaced the autorun virus file with an empty autorun.inf file and no virus.

The latest version of Windows will not overwrite an existing file, instead it will create a different file than the file name is autorun (2) .inf. So above we note that you do not apply this method to the new Windows version.

Method 2: Remove the autorun virus using the Command Prompt

This is the best method to remove viruses including autorun.inf files. Plug the USB into the computer, then access My computer and record the USB drive letter (C or D or E or F or G). For example, in the USB drive post, the drive letter is G, see the illustration below.

Destroy the autorun virus in USB or on PC with 4 simple ways Picture 2Destroy the autorun virus in USB or on PC with 4 simple ways Picture 2

Run Command Prompt with admin rights. You can refer to the article How to Open Command Prompt under Admin on Windows 8 and 10. For older Windows versions, follow the steps below.

Go to Start -> Run to -> type cmd and click OK -> Right click on Command Prompt and select " Run as Administrator" . In the Command Prompt window, type the following line:

Type G: and press enter

Type attrib -h -s -r -a *. * And press Enter .

Destroy the autorun virus in USB or on PC with 4 simple ways Picture 3Destroy the autorun virus in USB or on PC with 4 simple ways Picture 3

This command will delete hidden, system, read-only, and archive properties from all files in the 'G' drive. You can also use attrib -h -s -r -a autorun.inf to remove attributes from the autorun.inf file. Now type del autorun.inf and press Enter to delete the autorun files. In addition, users can also delete these files themselves.

Destroy the autorun virus in USB or on PC with 4 simple ways Picture 4Destroy the autorun virus in USB or on PC with 4 simple ways Picture 4

If you encounter any problems while executing this method, you can try the next method.

Method 3: Delete the autorun file in Safe Mode

Sometimes, the user may experience an ' access denied ' error after using the "attrib" command.

Destroy the autorun virus in USB or on PC with 4 simple ways Picture 5Destroy the autorun virus in USB or on PC with 4 simple ways Picture 5

To solve this problem, you just need to reboot the system in Safe Mode. If you don't know how to boot the system in safe mode, see the articles below:

  1. Enable Safe Mode in Windows 7
  2. Enable, use, and disable Safe Mode in Windows 8
  3. Summary of several ways to start Windows 10 in Safe Mode

Once in Safe Mode, open USB and delete the autorun file. Because they are in Safe Mode, users can easily delete them. In case it is not possible to delete the autorun file. Right-click the autorun.inf file -> Click " Properties " -> access the " Security " -> and adjust the access to " EVERYONE ".

Now restart the computer in normal mode and use the attrib and del command in method 2. If the above method still cannot remove the autorun file, you can consider the final method.

Method 4: Use winrar and sdformatter

Open USB with winrar, copy all files from USB to computer to delete autorun.inf. To format USB, you can use sdformatter to delete all viruses from your USB.

See more:

  1. Removing shortcut virus on USB has never been this simple
  2. "Great way" Autorun virus removal by hand
  3. Use the CMD command to remove viruses on Windows computers
3.7 ★ | 31 Vote