Computers Windows Internet

How to disable autostart of programs from a USB flash drive. How to disable autorun from USB flash drives and CD drives

When connecting external storage media to the computer such as: Flesh, CD and DVD discs, Windows 7 opens an autorun window with a list of suggested actions on the data that is in this media. Recently there was a question that just relates to this topic, namely, how to disable autorun Windows flash drives 7. You ask why the user is interested in this particular procedure? The answer is simple - for your own safety. To understand the whole point, I recommend reading the article about the autorun.inf file, which is located.

Hope you read the information in the link above. Now let's get down to practical steps. Many media contain special script, which automatically launches programs recorded on external media, but everyone knows that in this script you can write not only good intentions, but also make some adjustments with which this script will launch virus programs.

Running a virus program, as everyone already knows, can harm your data or introduce a virus into your computer. To protect your data, you can turn off the autorun function, using the standard Windows tools 7.

Disabling AutoPlay in Windows 7

We figured out why we need it, now I will show you how to disable the autorun of a flash drive or other device. To disable autorun, you need to go to "Start" - "Control Panel". In the next window you need to select "View" - "Small icons". Now we press.

So we got to the very essence of the article, where I will show you how to disable the autorun of a flash drive, CD or DVD Rom-a... Next, in the next window, uncheck the box "Use autorun for all media and devices."

Now when will you use external media on your computer, autorun will not start and, accordingly, this script will not be activated. But do not boldly go, for example, to a USB flash drive. When it is connected, go to Computer, click on it right click mouse and in the drop-down menu, select your antivirus. Thus, you will check it for viruses in order to know for sure that there are no viruses on the flash drive.


Rating: 4.4 out of 5
Votes: 38

Microsoft has done dummies a disservice in its Windows operating system - the ability to autorun programs from removable media, which is turned on by default. Undoubtedly, it will be convenient for a beginner to insert a disk into the CDROM, from which they will start themselves. required drivers and programs. With the help of autorun, drivers for USB modems Beeline, MTS and Megafon are independently installed.

And everything would be good and wonderful, if not for one big BUT. With the help of autorun, a huge amount of all kinds of viruses and malicious programs gets on the computer. Viral epidemics spreading through flash drives are a real disaster modern computers... By inserting a USB flash drive, which was previously used on another computer, the user runs the risk of running a malicious virus on his computer.

What is autorun
As mentioned above, for the convenience of unprepared users, Microsoft has introduced into the operating system Windows capability autorun programs from removable media. Its essence is very simple. In the root folder of any removable media you need to create a file Autorun.inf, which contains a command to run a specific program. If you insert such a medium into the computer, the system checks for the presence of the Autorun.inf file on it, and if it is found, then without asking any questions, it launches the program written in it. Taking advantage of this security hole, viruses spread through USB sticks and, much less often, through CD - DVD media.

Hidden Autorun.inf file generated by a virus


The simplest and quick way to protect your flash drive from starting a virus - create a folder named Autorun.inf in its root. In this case, the virus will not be able to create the autorun file Autorun.inf and, accordingly, will not be able to automatically start when the media is connected to the computer.
Fast and convenient, but this method has a drawback. Many virus writers know about this trick and can check for the presence of such a folder on a USB flash drive and delete it if it exists.

Protect the flash drive with the Autorun.inf folder

Disable autorun from removable media
For more advanced users, there is a more radical way - adjusting the autorun settings in the Windows registry.

To do this, open the Regedit registry editor ( Start - Run - Regedit)

Go to the address:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer

If the Explorer section does not exist (Windows XP Home Edition), then create it. Then, in the XP Home Edition section, create a key named NoDriveTypeAutoRun and assign it the hexadecimal value 0XFF, and the type is REG_DWORD (see screenshot)

Disable autostart in the registry


The key value 0XFF means disabling autorun for all disks. The NoDriveTypeAutoRun key can also have the following values:

0x1 - disables autorun on drives of unknown types
0x10 - disables autorun of network drives
0x20 - disables autostart of CD drives
0x4 - disables autorun of removable devices
0x40 - disables autostart of RAM disks
0x8 - disables autostart of non-removable devices
0x80 - disables autorun on drives of unknown types
0XFF - Disables all of the above drive types

The same, without directly editing the registry, can be done using the gpedit.msc console (not supported in Windows XP Home Edition).

Opening the console:
Start - Run - gpedit.msc

We choose:
Computer Configuration - Administrative Templates - System - Disable Autostart

We set the value: "On all drives", and the value "Enabled" (see screenshot)

Disable autostart in gpedit.msc console

We do the same with the section "User Configuration"
User Configuration - Administrative Templates - System - Disable Autostart.

This method is similar to the method with editing the registry, only you will make all changes in it through the gpedit.msc console. After that, autorun on all disks in the system will be disabled.

Attention! This method allows you to disable the autorun of programs from flash drives and other drives, but it does not protect the media itself from the virus. A virus can create a program file on a USB flash drive with an icon imitating a folder or graphic file with an intriguing title: "photo 2011", "my documents", etc. In this case, the intrigued user can run by himself malware on your computer even with autorun disabled. Be careful and careful, especially with flash drives that were previously connected to other computers.

Review address:

Depending on the version of the operating system, autorun is disabled in different ways.

Blocking autorun in Windows 7 and 8

Call the Run dialog box by clicking the Windows and R flag button (Win + R). In the Run form, type Control panel and click OK. Next, in the upper right corner of the panel, select "View: Large Icons". In Control Panel, find and click "AutoPlay". Remove the checkbox "Use autorun for all devices and media". In Windows 8.1, you need to slide the switch. Click "Save".

Using the built-in gpedit.msc utility to block autorun in Windows

If your OS is Windows XP, click Start and Run. In the Run form, type gpedit.msc and click OK. Expand the pluses "Computer Configuration - Administrative Template - System". Find and double-click Disable AutoPlay in the list. Click OK.

In Windows 7 and Vista, everything is the same, only the names of the options are slightly different: "Computer Configuration - Administrative Template - Windows Components - Autorun Policies". The same method is suitable for Professional, Ultimate, Enterprise editions. It should be noted that in all operating systems Windows editions Home, Starter, Basic, Premium snap-in gpedit.msc «Editor group policy" absent.

Blocking autorun in Windows using the registry

In Windows 7 and 8, open the Run dialog box by pressing the Windows and R (Win + R) flag keys. In the form of the Run window, enter the regedit command and click OK. To block autorun for all users, enter the registry: HKLM / Software / Microsoft / Windows / CurrеntVersion / Policies / Explorer /. To block autorun for the current user, enter the registry:
HKCU / Software / Microsoft / Windows / CurrentVersion / policies / Explorer /. On the right, find the NoDriveTypeAutoRun parameter. If it is missing, create a 32-bit DWORD value with the given name. Assign a value to it 000000FF (decimal value 255).

If you are using Windows XP, find the following branch in the registry: HKCU \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ policies \ Explorer \ NoDriveTypeAutorun. Next, right-click on the NoDriveTypeAutoRun parameter, and left-click on "Change". To block all types of disks, assign the value 0xFF. Then restart your computer.