On one of my article, I discussed how to disable the autorun feature in Windows to minimize the spread of USB viruses. In addition to that, I also created an article about creating a folder named “autorun.inf” on your USB drive to prevent viruses from creating an autorun.inf file.
Unfortunately there are some malware which are smart enough to delete the autorun.inf folder so they could successfuly create an autorun.inf file on your portable drives. To prevent this, we will create a special folder inside your autorun.inf folder. Once this is created, even you wouldn’t be able to delete the autorun.inf folder easily.
Follow the steps below to create a special folder called CON inside your autorun.inf folder. Let us assume that your USB drive letter is E:
- Click Start->Run… and type CMD.
- At the command prompt type, E: then hit Enter
- Type MD AUTORUN.INF, hit Enter (skip this step if you already have an autorun.inf folder)
- Type CD AUTORUN.INF, hit Enter
- Type MD .\CON\, hit Enter.
For an explanation about the CON folder, read my article about the “magic” in Microsoft.










you are indeed a sensei….=)
after creating the con folder, you can always hide the autorun.inf so it wouldn’t be that annoying.
you can type at the command prompt at the root directory of your flash drive:
attrib +r +s +h autorun.inf
this way, your autorun.inf will be read-only, system file and hidden at the same time.
I have already type and save AUTORUN.INF in my USB Flash Drive and then i skip Step No. 3 because i have already the autorun.inf, And then my problem now is when i Type CD AUTORUN.INF in command prompt inside. It shows a message “The directory name is invalid” in command prompt. My autorun.inf file is not hidden. But I tried to type MD .\CON\. There is folder name CON existed in my USB DRive. My question is, is it ok now? even when i type CD AUTORUN.INF, it says “The Directory name is invalid”????
Sorry for my Bad English. Now i already have the con folder and I hide the autorun.inf Folder.
If you get “The directory name is invalid”,it means you don’t have the autorun.inf FOLDER yet. Make sure it is a FOLDER not a FILE. Put the CON folder inside the autorun.inf folder.
I have followed the steps n hv created the folder “autorun.inf”, inclding “con” in the folder. However, I found a situation here. A virus still infect my USB drive. Although it can’t create an autorun.inf file in my USB drive, it changes my folder to “autorun.inf.scr”. AVG scan n found it and I moved the autorun.inf.scr to vault. Now, I can’t see my autorun.inf folder anymore, even if I enable “Show hidden files”. Windows system just can’t read the folder anymore. However, in DOS (Run>cmd), there is still a folder name “autorun.inf” in my USB becoz I can’t use “md autorun.inf”. However, using command “dir/w” will not show it also. No matter how, in an experiment, I found that although the Windows can’t see the “autorun.inf” folder, the virus still can’t create “autorun.inf” file anymore in my USB drive. This is strange to me. Could u help to explain?
The virus infecting your computer has probably hidden the autorun.inf folder. When you “show hidden files,” the virus probably switched it back to “do not show hidden files” that’s why Windows still can’t see it. In the DOS prompt, try typing “DIR/AH” to see the hidden files. To remove the Hidden/system/read-only attribute, type “ATTRIB -r -h -s autorun.inf”.
If your PC is infected and your antivirus can’t fix it, try using Combofix. Follow this link: http://extratopics.com/how-tos/removing-malware-using-combofix.html