Sunday, May 23, 2010

Disable Autorun for Drives to prevent from Virus

Method 1
Autoplay play feature is not only available in CD drives, but also on the flash drives and external hard drives that you connect to your PC. In any case your external drives or CDs are infected with virus or malwares, then chances are there that your PC could also be infected with the autoplay feature. Best way to combat this issue is to disable autoplay on all your system drives.

To disable autoplay on all drives, best method is to change it through Group Policy Editor. To do this click run and type gpedit.msc and press enter. Navigate to Local Computer Policy-> Computer Configuration->Administrative Templates-> System. Now on the right panel double click Turn off Autoplay.  Now select enabled and choose All drives from the dropdown list and click ok.

Method 2

You can either copy the three lines below from this web page .The file name is not important, other than it should end with ".reg". Copy this code below it and save on to notepad with extension ".reg".
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf]
Note that there are three lines in the file, the middle line may wrap when displayed by a web browser, but it needs to be a single line in the .reg file.

Once you have a dot reg file on your computer, just double click on it.
On a Windows XP computer, you'll see the following warning before the registry zap is actually made ...

and the following confirmation, after it was made.**

Now if you want to enable Autorun for your drives then follow this method.
Restoring Autorun of Drives 
Open REGEDIT and navigate down to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping. There will be a subkey ("folder") called Autorun.inf. Delete it.
Regedit is the Windows registry editor. To run it in XP, click Start -> Run -> type "regedit" without the quotes -> then click the OK button. To run it in Vista, click Start and type "regedit" into the search box. 
The look and feel of browsing the registry with regedit is very much like browsing files and folders with Windows Explorer. You delete a subkey in the registry by right clicking on it and selecting Delete from the popup menu.
After deleting the autorun.inf subkey from the registry, you have to reboot (at least in Windows XP) for the change to take effect then your system will get auto run for drives enabled