In Windows 7, Vista, and XP, two important changes were made to help improve security:
This will show you how to enable or disable AutoPlay for all non-volume devices like MTP devices (ex: Flash Drive) with still having AutoPlay turned on in Windows 7.
You must be logged in as an administrator to be able to do the steps in this tutorial.
NOTE
When a CD/DVD disc is inserted or a USB drive is connected to your system, Windows looks in the root directory of the new disc or drive for a file named autorun.inf. When found, Windows executes the instructions (keys) in that file.
1. AutoPlay will no longer support the Auto Run functionality for non-optical removable media. In other words, AutoPlay will still work for CD/DVDs but it will no longer work for USB drives. For example, if an infected USB drive is inserted on a machine then the Auto Run task will not be displayed. This will block the increasing social engineer threat highlighted in the SIR. The dialogs below highlight the difference that users will see after this change. Before the change, the malware is leveraging Auto Run (box in red) to confuse the user. After the change, Auto Run will no longer work, so the AutoPlay options are safe.
2. A dialog change was done to clarify that the program being executed is running from external media.
By default in Windows 7, Vista, and XP now, the only [Auto run] keys available for USB/removable drives are below. The rest of the keys are ignored.
•label - This key is responsible for displaying a custom name (label) for a CD/DVD or USB drive in Computer when a CD/DVD is inserted or a USB drive is connected.
•icon - This key is responsible for displaying a custom icon for a CD/DVD or USB drive in Computer when a CD/DVD is inserted or a USB drive is connected.
EXAMPLE:
If you disable AutoPlay for all non-volume devices and you connect a Flash Drive, the device stage or selected action will no longer open automatically even if set to do so in the AutoPlay settings.
OPTION 1
OPTION TWO
You will need to be an administrator to open the Local Group Policy Editor.
The Local Group Policy Editor will only be available in the Windows 7 Professional, Ultimate, and Enterprise editions.
The Local Group Policy Editor feature is not included in the Windows 7 Starter, Home Basic, and Home Premium editions. USE OPTION 1
Through the Local Group Policy Editor
1. Open the Start menu, and type gpedit.msc in the search line and press Enter
2. In the left pane, click on to expand User Configuration, Administrative Templates, Windows Components, and AutoPlay Policies. (see screenshot below)
NOTE: This option affects all users on the computer.
1. to Enable AutoPlay for Non-volume Devices
NOTE: This is the default setting.
A) Turn On auto play and enable AutoPlay if not already.
B) Click on the Download button below to download the file below.
Enable_AutoPlay_for_Non-volume_Devices.reg
3. In the right pane, right click on Turn off Autoplay for non-volume devices and click on Edit. (see screenshot above)
4. To Enable AutoPlay for Non-volume Devices
A) Turn On AutoPlay and enable AutoPlay if not already.
B) Select (dot) either Not Configured or Disabled. (see screenshot below step 6)
NOTE: Not Configured is the default setting.
C) Go to step 6.
5. To Disable AutoPlay for Non-volume Devices
A) Select (dot) Enabled. (see screenshot below step 6)
6. Click on OK. (see screenshot below)
THE DOWN LOAD MIGHT COME UP WITH A SECURITY WARNING THE FILES ARE OK TO DOWNLOAD
C) Go to step 3.
2. To Disable AutoPlay for Non-volume Devices
A) Click on the Download button below to download the file below.
Disable_AutoPlay_for_Non-volume_Devices.reg
3. Click on Save, and save the .reg file to the desktop.
4. Right click on the downloaded .reg file and click on Merge.
5. Click on Run, Yes, Yes, and OK when prompted.
6. When done, you can delete the downloaded .reg file if you like.
7. Log off and log on, or restart the computer to fully apply.
THEN JUST APPLY AND YOU ARE DONE