Autorun, Autoplay

Tue, 2007-07-17 19:41 by admin · Forum/category:

General

There are two different kinds of autorun, also called autoplay, that are technically quite distinct. One is that some programs run on their own after your computer is booted and a user logs on. This is sometimes called autostart or autorun.

The other is that some programs are automatically loaded when you insert removable drive media like a DVD or some other removable storage. This is usually called autoplay or sometimes confusingly also autorun. Let's deal with this first.

Another issue is autologon, the ability of a computer to boot and log on as one user without having to enter username and password on the keyboard.

Autoplay after inserting a CD or DVD

General

The two most common complaints about autoplay are that it works when it shouldn't and that it doesn't work when it should.

I want to shut it off

To shut it off globally for CD and DVD drives or for all drives, use the following procedure:

  1. Click on the button: [Start]
  2. Click on: Run …
  3. Enter: gpedit.msc
  4. Navigate to: Administrative Templates
  5. Navigate to: System
  6. Double-click on: Turn off Autoplay
  7. Check: Enabled
  8. Select: CD-ROM drives or All drives (your choice)
  9. Click on: [OK]

An alternative method to shut it off globally for all CD and DVD drives is to use Start, Run ..., regedit to navigate to the following key:

HKEY_LOCAL_MACHINE
 \SYSTEM
  \CurrentControlSet
   \Services
    \Cdrom
REG_DWORD value: Autorun

Change this value from 1 to 0.

Of course, changing it back to 1 will re-enable autorun.

To change Autorun for a particular CD or DVD drive, right-click on the drive in Windows Explorer and use the Autorun tab.

There is a second registry key that affects the autorun function in Windows Vista and possibly also in Windows XP. It can occur twice, once for each user and once for the entire machine.

HKEY_CURRENT_USER
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \Policies
      \Explorer
REG_DWORD value: NoDriveTypeAutoRun

HKEY_LOCAL_MACHINE
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \Policies
      \Explorer
REG_DWORD value: NoDriveTypeAutoRun

Hexadecimal B5 or decimal 181 indicates that Autorun is off, while hexadecimal 91 or decimal 145 indicates that Autorun is active.

The meaning of these values is:

Value Meaning
0x1 Disables Autoplay on drives of unknown type.
0x4 Disables Autoplay on removable drives.
0x8 Disables Autoplay on fixed drives.
0x10 Disables Autoplay on network drives.
0x20 Disables Autoplay on CD-ROM drives.
0x40 Disables Autoplay on RAM drives.
0x80 Disables Autoplay on drives of unknown type.
0xFF Disables Autoplay on all types of drives.

The actual value is the sum of the selected values. The default value is 0x95.

More information on annoyances.org

I want autoplay, but it doesn't work right on my machine

Here is a repair utility that can be distributed freely:

Autoplay Repair Wizard

The utility is a simple executable that checks the autoplay (also called autorun) settings on the machine and offers to repair the problems it finds. It also outputs a log of the checks, what it found, the repair steps attempted and the repair results in the user's My Documents folder.

The wizard does not replace or modify any binaries on the system. It just modifies settings (mostly bringing them back to factory settings). It will not modify settings unless the user requests it by pressing one of the many Repair buttons.

It is provided AS IS with no warranties, and confers no rights.

Why does a program run on its own?

The cause that is the easiest to handle is that a shortcut to the program has been placed in the Startup folder of the Start menu either in the profile of the user or in the All Users profile. You can see those by clicking on the Start button and choosing All Programs.

To check particularly the All Users profile's menu, right-click on the Start button and elect to open or use Explorer on the All Users start menu.

The following Microsoft Knowledge Base article lets you manage the most common autostart options on your computer:

How to Troubleshoot By Using the Msconfig Utility in Windows XP
http://support.microsoft.com/kb/310560/

In short, click on the Start button, choose Run... and enter: msconfig

A much more thorough tool is Autoruns from www.sysinternals.com.

One particular problem can be that a folder opens every time you log on to Windows. This can be caused by a path that contains at least one space, but is not enclosed in double quotes. You can try to repair this manually (see below), or you can disable or remove that path if you are sure you don't need it.

If you want to delve into the details manually, here is where to find the most important places and some more by using Windows Explorer and the registry editor.

 
Folders with shortcuts

\Documents and Settings\All Users\Start Menu\Programs\Startup

\Documents and Settings\%USERNAME%\Start Menu\Programs\Startup

 
Registry keys

HKEY_LOCAL_MACHINE
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \Run

HKEY_CURRENT_USER
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \Run

HKEY_LOCAL_MACHINE
 \SOFTWARE
  \Microsoft
   \Windows
    \CurrentVersion
     \policies
      \Explorer
       \Run

HKEY_LOCAL_MACHINE
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \RunOnce

HKEY_CURRENT_USER
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \RunOnce

HKEY_LOCAL_MACHINE
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \RunServices

HKEY_LOCAL_MACHINE
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \RunServicesOnce

HKEY_LOCAL_MACHINE
 \Software
  \Microsoft
   \Windows
    \CurrentVersion
     \RunOnce
      \Setup

HKEY_CURRENT_USER
 \Software
  \Microsoft
   \Windows NT
    \CurrentVersion
     \Windows
   Value: run

HKEY_LOCAL_MACHINE
 \System
  \CurrentControlSet
   \Control
    \VMM32Files

HKEY_LOCAL_MACHINE
 \System
  \CurrentControlSet
   \Services
    \VxD