Ever wondered about “autorun.inf” file in CDs/Pen Drives!

While opening some optical drives (CDs) or pen drives you might have noticed that they contain autorun.inf file in it. Some people assume that it is some Virus/Malware which might infect their computer. But actually autorun.inf is just a script for invoking any event when some CD or Pen Drive is Inserted in PC. This feature is actually a part of shell32.dll.

You can set your own custom icon and your own custom file to start when media is inserted in computer. If you are a geek, then you can accomplish much more and impress your friends with some smart autorun scripts while burning CDs for them!

A sample of autorun.inf file looks like as shown below:
[autorun]
open=autorun.exe
icon=autorun.ico
label= My Thumb Drive(98XXXXXXXX)

Taking above examples I’ll explain functions of commands here-

  • Open – Specifies which file to start when media is Inserted.
  • Icon – Specifies the Icon to appear in Windows explorer
  • Label – The Volume of Drive to Appear in Window Explorer

If you are lazy at writing this codes you can try a free tool, Autorun.inf Maker.

Autorun Maker

You can bypass events written in autorun.inf by pressing shift key while inserting Pen Drive or CD. This is useful when you are unsure about what Pen Drive or CD might contain. However, I recommend you to use some good antivirus like AVG or Avast which takes less load on system and detects any unwanted threats. There is also an antivirus Program which is made for this purpose only which is mentioned here.

Link : Download Autorun Maker
Also Read : Special Virus Scanner for USB

5 Comments

Gautam January 19, 2009

Autorun files can be harmful too if people use it to run malioucious exes.
Though it was obviously made for benefit to the people.

nicky January 20, 2009

how about auto running malicious file using .inf file
its better to disable these files security of pc is more important that looks…

Prateek January 20, 2009

Its the “windows” OS in which you’ll find Autorun.inf working. This has made Windows more Vulnurable and prone to get effected with viruses..
You’ll not find this kind of Security related problem in Mac or Linux

Rahul Bansal January 26, 2009

@Gautam, Nicky & Prateek
I agree with you all but there are times when you really love autorun,inf.
I remember using autorun.inf scripts on many occasions to impress people specially teachers during my college days! 😉

Keenic February 22, 2009

I also agree that these .inf files may be dangerous. I also agree that when used for non-malicious purposes they are convenient. If only there were some advanced futuristic software or hardware that informs a user when these or any other form autorunning code is activated…it sucks that someone always comes up with a loop hole :/