Disabling
autorun can prevent viruses that come from your flash drives/USB. Once you have inserted your CD/Flash drives on to your computer, Windows checks for the presence of autorun.inf and if found, follows the instructions contained within that file.
An Autorun file may be useful, or worse, it may contain worm. worm copies itself to the root of the drive, then creates or modifies the autorun.inf file, instructing it to run the dropped worm each time the drive is accessed. When the worm is loaded, it then looks for similar drives and repeats the process on any drives that are discovered.
Do Autorun worms do anything besides spread? Yes. Autorun worms nearly always include a component that downloads or drops additional
malware, usually backdoors and password stealers. In addition, most Autorun worms include the ability to disable antivirus and security software which leaves the system vulnerable to compromise by even previously well known and detectable threats.
I believe the fact that disabling autorun.inf can save you from installing an anti-virus software which can make your computer slower because it consumes a lot of memory. But it is suggested that you should install an anti-virus software especially when you are browsing the world wide web.
How to disable autorun by yourself? Here are the steps:
a.). click start->run
b). type "regedit"
c) navigate through:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping
d). right click in IniFileMapping. click new -> key
e). type in "Autorun.inf"
f). right click on the right panel. Select new->string value and just name it "(default)".
g). Double click the data then type "@SYS:DoesNotExist" as value data. Restart to make changes.
You can enable Autorun.inf by deleting "Autorun.inf" key. However, if you don't have any idea on using Windows registry, you might want to consider my
program.

I wrote code that automatically disable/enable autorun.inf. I considered disabling autoplay as well because it also acts like autorun. An autoplay dialog box is like these:
private void button3_Click(object sender, EventArgs e)
{
try
{
const string KeyName =
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf";
Registry.SetValue(KeyName, "", @"@SYS:DoesNotExist");
const string userRoot =
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer";
Registry.SetValue(userRoot, "NoDriveTypeAutoRun", 255);
}
catch (Exception ex )
{
throw ex;
}
}
To enable, Just delete the key values.
private void button5_Click(object sender, EventArgs e)
{
const string p = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf";
try
{
using (RegistryKey delKey =
Registry.LocalMachine.OpenSubKey
(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer", true))
{
delKey.DeleteValue("NoDriveTypeAutoRun");
}
Registry.LocalMachine.DeleteSubKey(p);
}
catch (Exception ex)
{
if (ex.Message=="No value exists with that name.")
MessageBox.Show("Autorun already enabled","Error!!");
}
}
Additional notes: You must be in administrator role to in order to write on to the registry. You must restart/log-off your computer to make changes.