Disable USB Drive Autorun

Windows provided Autorun features for quick software response to inserted media or connected drives. The moment USB is inserted; Autorun begins reading from it whether it contains music, video or executable file. Autorun commands are typically kept on a file called autorun.inf. These commands provide an automatic start for applications and media files. Most software manufacturers are utilizing this function to start the installation of their program right after the media is inserted. Since it is a general functionality, there is a risk that the feature is utilized in a malicious approach.

AutoPlay Function

AutoPlay Function in Windows 7

In this age of Internet and USB devices, Autorun is being misuse by computer thefts and hackers. A Trojan called Downloader.Agent effectively exploited this function to harm countless computers globally. That is one reason why most users wanted this feature disabled. Another basis why people wish to halt this action is for security reason, possibly to avoid execution of codes without their consent.

Below is a guide to help you disable Autorun function for USB and other devices. Please note that removing Autorun.inf from any device can resolve certain issues.

Disable Autorun in Windows XP, Windows Vista and Windows 7 without Group Policy

Group Policy is probably the simplest way to disable the Autorun feature. However, Group Policy is not available in some versions of Windows particularly on Home Edition. This is the reason why disabling Autorun using the registry is on top of the list. You must have an administrative privilege to execute this.

1. Click on Start > Run. Alternatively, you can use [Windows Key]+[R] on your keyboard.

2. Type regedit in the box. Click OK or press Enter on keyboard.

3. When User Account Control prompts if you want the allow the program to make changes on computer, click Yes.

4. Locate the registry entry:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
\policies\Explorer\NoDriveTypeAutorun

5. Double-click on NoDriveTypeAutoRun.

6. In the Value data box, type 0x4 to disable Autorun on removable drives including USB. Refer to the list below to disable specific drives.

 

If the value “NoDriveTypeAutoRun” is not present:

There is a chance that the value NoDriveTypeAutoRun do not exists. Follow these steps to add the value in the registry.

1. Navigate to the following entry:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\

2. On right pane, right-click then New > DWORD (32-bit) Value. Name the value NoDriveTypeAutoRun.

No Autorun

Creating NoDriveTypeAutoRun value.

3. After creating the value. Double-click on it. In the Value data box, type 0x4 to disable Autorun on removable drives including USB. Refer to the list below to disable specific drives.

4. Exit registry editor and restart the computer.

List of Settings for NoDriveTypeAutoRun
0x1 or 0x80 – Disables AutoRun on drives of unknown type 
0x4 – Disables AutoRun on removable drives 
0x8 – Disables AutoRun on fixed drives 
0x10 – Disables AutoRun on network drives 
0x20 – Disables AutoRun on CD-ROM drives 
0x40 – Disables AutoRun on RAM disks 
0xFF – Disables AutoRun on all kinds of drives 

 

How to Disable Autorun with Group Policy:

Please take note that Group Policy is not available on some versions of Windows. To access this feature, you must login with Administrative account.

1. Click on Start > Run. Alternatively, you can use [Windows Key]+[R] on your keyboard.

2. Type Gpedit.msc in the box. Click OK or press Enter on keyboard.

3. It will prompt for Administrator password. Please continue by providing the password and click on Continue.

4. Local Group Policy Editor will open.

5. Go to Computer Configuration, click on Administrative Templates, click on Windows Components and then click on Autoplay Policies.

6. Click Enabled.

7. Select specific drive on Turn off Autoplay to disable Autorun on that drive.

Autorun Group Policy

Two methods to disable Autorun

8. Another method is to set Default behavior for Autorun. Click Enabled and select Do not execute any autorun command. This will generally disable Autorun command on all drives.

8. Restart the computer.

You might find these helpful:

5 Comments

  1. Michael James Lee
    Feb 07, 2009 @ 02:09:44

    I alredy try the suggestion of this site on how to disable usb autorun, but still it doesn’t work.

    i also try the regedit and gpedit.msc but still none of it works. i hope this site will soon provide onother valid suggestion in disabling my usb autoran. thank you

  2. Cheng
    Apr 12, 2009 @ 08:16:02

    here is something i want to share to you. I have just known it through experience.

    try this one to disable autoplay on flash drives:

    -on run command type: gpedit.msc
    -go to computer configuration/administrative templates/system
    -find: turn off autoplay
    -set it to enabled
    -restart to see if it works.
    -try to insert a flash drive on windows start-up when you reached the desktop

  3. apetronic
    Apr 24, 2009 @ 22:07:04

    pressing the shift-key while inserting the usb-unit will resolve the problem the first time you insert the device (skip autorun)

    A more persistent way would be to add “NoDriveAutoRun” as a Dword entry under
    [HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer]

    the value is bitwise according to the following table:

    Bit Drive Types
    ——————
    0 Unknown drives
    1 No root directory
    2 Removable drives (Floppy, ZIP)
    3 Hard disk drives
    4 Network drives
    5 CD-ROM drives
    6 RAM disk drives
    7 Reserved
    Some basic binary math (or converting the binary bitmask to hex in calc set to scientific mode) tells that setting the (dword/hex) value “ff” (255 decimal, or 11111111 binary) will disable autorun on all units

  4. danielfenton29
    Jul 22, 2009 @ 04:09:37

    try this step:

    press window key + r
    type gpedit.msc
    in the user configuration node,
    select Administrative Templates,
    then System.

    double click the turn off autoplay setting,
    then click the enable (this will enable windows to turn off autoplay)
    and choose All drives in the combo box to turn off autoplay in all drives,
    finally click OK.

    :)

  5. Mukesh Agravat
    Aug 22, 2010 @ 04:28:34

    How to Disable USB Drive to autorun (Windows XP):

    Open Windows Explorer or press the Windows + “e” key.
    Right-click the drive of the USB Drive. Then select Properties. Drive Properties will appear.
    Select the AutoPlay tab.
    Choose Select an Action to Perform
    At the bottom of the selection, click Take no Action, then click Apply.
    Click OK to exit Drive Properties

Leave a Reply

*

privacy policy