Here’s The Four Most Effortless Ways To Remove Autorun Virus From Pen-drive

In todays world, our dependency on external devices like Pen drive or SD card is increasing day by day and it’s not a big deal, if data stored on them get corrupted or deleted. Although, there can be a endless reasons for this corruption and damage, but still among them Autorun Virus has been considered as root cause for damaging and corrupting data stored on the device. Now, I’m sure you were thinking what is Autorun Virus. Let’s have a look and its definition and four easy removal method.

Autorun-virus is nothing but a viruses that do have tendency to writes itself on any flash drive (or other external device) and even can contaminate your PC while opening it in Explorer. Actually, it’s a new type of threat that has same effect as of other PC malware. No doubt, it’s totally unreliable that usually begins with spying on your PC and ends with destructing everything.
The principle of infection

An Autorun-virus actually makes record in autorun.inf files after writing itself on the pen drive. And that autorun.inf usually launched when double click on the pen drive in Explorer. It’s a system file that usually resides in the drive root and guide window for which program have to start while entering to that particular drive and for what program they have to displayed in the autoplay window.

Mainly, Autorun was discovered and designed for the CD-ROM drive with the intension for supplying legitimate software on CD-ROMs in order to start automatically while inserting that particular CD-ROM to the PC or entering onto it via Windows Explorer. And with the increasing craze and widespread of external media like flash drives or external USB\SATA hard drives, the creator of Windows immediately have transmitted that feature to them. Although, they at that time haven’t thought for occurring possible troubles. Unlike a CD a legitimate file autorun.inf can be modified to malware with very ease.

Where Pen Drive can catch Autorun Virus

autorun-virus is highly tricky and uses several shady ways to attack on Pen drive without any kind of approval. Among them, Internet Cafe is mostly found reasons for the infiltrataion of this extremely harmful programs. Also, you can get it from the photo shop, when giving to print your photos.

Is It Possible To Remove autorun.inf file?

Yes..Yes..Yes….It’s quite simple to remove autorun.inf file without any type of harm to your Pen drive or PC. Remember, after deleting Pen drive autorun.inf file, Windows will not launch pen drive automatically.But, it’s not a big matter, as you can do it by simply going in to my computer. Now the question arises how to remove autorun.inf file?

Although, you cannot delete autorun virus manually as it contains system, archive, hidden and read-only attributes. And if you want to remove any file that having any one of the above four attributes, then primarily you have to remove those attributes from file. It can be done simply by using command prompt.

In order to change file attributes, you need to use attrib command. To delete virus manually, this command can be used. Remember, you can’t delete any threat from delete button, as they poses “hidden” or “system” or “read-only” file attribute. And only after deleting these file attribute, you can remove virus easily with delete button. And attrib command will not only remove virus but also helps you to hide your file or to create read-only files.

Syntax of attrib command is,
attrib [+ | – attribute] [drive][path][file name] [/s][/d]

Here, you have to replace “attribute” with H or A or S or R. Also, this command can be used without last two letters that is /S and /D.

  • You can use +R in order to make file read only, but doing so means removing power from everyone to edit or delete the file.
  • -R can be used to remove read only attribute.
  • +A can be used in order to to set archive attribute to any file. It can also be used together with BACKUP or XCOPY commands.
  • -A can be used to remove archive attribute.
  • +H can be used to hide file.
  • -H can be used to remove hide attribute.
  • /S can be used so as to apply attributes to sub-directories in the given path.
  • You can use /D so as to include process folders.
  • +S to make the file as command file used only by DOS.
  • -S can be used to turn off system attribute.

How to use attrib command to Change file attributes

From above four attributes, mostly R and H attributes is needed. However, S attribute can also be used with the combination with H and R attributes.
For Instance : A test folder in E drive has been created which contains three documents. Have a look on the path described below.

launch command prompt as administrator and then right click on cmd. “Run as Administrator” option will be seem. Use below command to hide trial.txt file. You can replace ‘e’ with your drive letter, and “test” with your folder name and “trial.txt” with your file name.
attrib +h e:\test\trial.txt
attrib +h +s e:\test\trial.txt
attrib +h +s e:\test\trial.txt /s

It’s a possible options means only first command is enough to alter file attributes.
In order to unhide trial.txt file, use below command.
attrib -h e:\test\trial.txt

Similarly, you can also use given attributes.


Now Lets have a look on possible way to delete autorun virus from pen drive

Znajomi !! Jeśli szukasz usuwania wirusa autorun z pendrive’a, to moim zdaniem należy podjąć pomocą To nie jest przewiewne sugestia. Właściwie to o dwa lub trzy miesiące temu również podjęła pomoc stamtąd tak, aby usunąć autorun wirusa i wreszcie Sukces.

Method 1 : Create Duplicate autorun.inf file

This method is only applicable for older versions of Windows not with latest versions.
Attach pen drive into your system’s USB slot and open it. Right click on space and then make a new empty text document having “autorun.inf” name and save it. Now at the time of saving, it will be asked to replace existing autorun file, click yes. Doing all this means, autorun file has been replaced with autorun.inf file which is empty. Now your Pen Drive is virus free. In case of having latest Windows version, performing the same will not overwrite the existing file. It will creates a new file with autorun(2).inf file name.

Method 2 : Delete autorun virus by using command prompt

Go to My Computer after inserting pen drive to your system’s USB slot. Note down drive of your pen drive’s drive letter.
Open command prompt as a and for this simply press “Windows+R” simultaneously and and type cmd in the dialog box and click OK. Then after right click on the Command Prompt and choose “Run as Administrator option. It will generate a command prompt window and there you have to type G: and press enter.

Type attrib -h -s -r -a *.* and hit enter


Doing all this will removes all the four attribute that is hidden almost of all the files stored in the specified drive that is G drive. Also, if you want to remove all these attributed from autorun.inf file, then type attrib -h -s -r -a autorun.inf.

Then simply type del autorun.inf and hit enter in order to delete the files This can also be done manually.


In case of having any difficulty with this method, try below one.

Method 3: Delete autorun File in Safe mode

Actually, it may happened that you get error message like “access denied” while using “attrib” command.


In order to resolve this problem, reboot your PC in safe mode and for this just restart your PC and keep pressing “F8” which will display “Advanced boot options” like below. There three options will be seem. Choose “Safe Mode with Networking” by using arrow keys and hit enter. Selecting any other option will not allows you to use Internet.

Now insert and open your pen drive and delete autorun file. Being in safe mode, you can remove autorun files easily. And unablw to do so, right click on autorun.inf file and select “Properties” and go to “Security”. And from there choose and edit access permissions to “EVERYONE”. Then after reboot your system (in normal mode) and use attrib and del command as shown in method 2.
Still if you see problem, then go for next step.

Method 4 : Use winrar and sdformatter

Insert and open your flash drive with winrar and copy all files of your flash drive to your PC computer by leaving autorun.inf in the pen drive. Then Format the drive.

After trying all these, if you still unable to remove autorun virus from Pen drive, the, it’s quite better to take help of any of the powerful and effective third party software.

Source :

Leave a Reply

Your email address will not be published. Required fields are marked *