Pen Drives and viruses have became a perfect duo these days. Every time we plug a drive that comes from a remote system, we feel insecure as virus might have traveled via that drive and may infect your system. Antivirus surely makes a sense but remember that these drives are made for portable use and not every system has a good antivirus. So here is a very simple approach, we will create two folders to prevent virus! You might be thinking that I am joking but I am serious. Lets have deeper look at this method.

Pen Drives

You might be known to a term known as Autorun file. It basically helps in starting a program from the drive when it is plugged in to a system. Now most of the viruses use Autorun file to self-start themselves when the drive is plugged in. Autorun has two variants: 1. Autorun.ini & 2. Autorun.inf So if we have to prevent these type of viruses from spreading we just have to block this Autorun file from executing. This can be done at two levels:

  1. Altering the Operating System’s Autorun settings.
  2. Making creation of these files impossible (which we are going to do in this article).

In order to do so we have to prevent viruses in infected system from creating this Autorun file, we take a very simple approach. Windows and some other OS doesn’t allows creating a file and folder of same name. So what we basically do is create folders with name of autorun variants which blocks the creation of autorun files. Here is a step-by-step process:

  1. Open your pen drive’s root directory.
  2. Delete autorun.ini and autorun.inf files (if they exist).
  3. Create two empty folders and name them as Autorun.ini & Autorun.inf (Not Case-sensitive).
  4. For added security, right click the above newly created folders,open its Properties and select the option “Read Only”. (You may also mark them as hidden if you wish. This is basically for your convenience only.)
  5. That’s it, your drive is now ready to fight against those crazy perks. ;)

If you are unable to create directories with this name, it is probably because you didn’t deleted autorun files as they might be hidden or marked as a system file and so they don’t appear in Windows explorer. In this case you have to unhide them or remove the system file property. You can also format your drive and create these folder. Don’t forget to backup your data before you format.

Let me remind you, this technique doesn’t guarantee 100% security because it depends on various factors such as OS and the technique that a particular virus use. But still it is good for the most common one’s. If you take my personal experience, I have never experienced a virus again after doing so and I highly recommend this method to to my friends and relatives.

This trick will work only in Windows and some other Operating systems, so you can’t fully rely on this method. And you will not be able to use Autorun functionality from your drive which is not a big deal against protecting your drives.