Autorun.inf file present on the removable media device. If you happen to connect an infected removable media device like USB to your computer and then make use of the ‘Open folder to view files’ option, the malware will get activated and thereby attack all the files of your system. The only way to deal with this problem is to disable the Autorun feature of Windows.
Here are the steps by step process to disable Autorun feature in Windows.
Step 1. First open Run dialogue box. Here you need to enter Gpedit.msc and then click on OK.
Step 2. You will now see the Local Group Policy Editor on your screen.
Step 3. On the Local Group Policy Editor, you need to click on Computer Configuration > Administrative Templates> Windows Components. Under Windows Components, you will see AutoPlay Policies.
Step 4. When you click on AutoPlay Policies on the left, you will also see an option that says Turn off AutoPlay on the right. Click on it and then choose the Edit option.
Step 5. On the Turn off AutoPlay window, you need to select the Enabled option.
Step 6. Click on the Apply and OK buttons and to finish the disable Autorun feature on Windows 7. Also make sure you select the All drives option as shown on the screenshot of step no.5 in order to disable the Autorun feature on all drives.