Sie sind auf Seite 1von 3

Definition of the RunOnce Keys in the Registry (Win 95 ME)

SUMMARY There are seven Run keys in the registry that cause programs to be run automatically: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\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

MORE INFORMATION
Keys 1 through 7 apply to Windows 95, Windows 98, Windows 98 Second Edition, and Windows Millennium Edition (Me).

Keys 1 through 4 also apply to Windows NT 4.0 and Windows 2000.

For Windows 98, Windows 98 Second Edition, Windows Me, Windows NT 4.0 SP3 or later, and Windows 2000, an additional ru available; for keys 3 and 4, the value name can be prefixed with an asterisk to force the program to run even in Safe mode.

Keys 1 through 4 are run each time a new user logs in.

Keys 5 and 6 are run in the background when the logon dialog box first appears, or at this stage of the boot process if there is n These keys are for background services such as remote registry service and are run only once per boot.

Key 7 is run as part of Setup's first-boot activities, or after you use the Add/Remove Programs Wizard.

Under each of these keys is a series of values. The values are used to allow multiple subentries to exist without overwriting one

The data value for a value is a command line. By default, Run keys are ignored in Safe mode. For keys 3 and 4, the value name prefixed with an exclamation point to defer deletion of the value until after the command has been completed.

For keys 3, 4, and 6, the value is deleted before the command line is run unless overridden as noted above. As a result, if a Run operation fails to run properly, the component that failed will not be asked to run again the next time you start the computer.

Key 7 is used only by Setup. This key displays the progress dialog box as the keys are run one at a time. For key 7, the name o the name that is displayed in the dialog box.

Article ID: 314866 - Last Review: December 1, 2007 - Revision: 2.6

A definition of the Run keys in the Windows XP registry


View products that this article applies to. This article was previously published under Q314866 For a Microsoft Windows 2000 version of this article, see 137367 . Expand all | Collapse all SUMMARY

This article lists and defines four Run keys that are in the Microsoft Windows XP registry. MORE INFORMATION

Run keys cause programs to automatically run each time that a user logs on. The Windows XP registry includes the following four Run keys: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce Each of these keys has a series of values. The values allow multiple entries to exist without overwriting one another. The data value for a value is a command line.

There are some special considerations for the third and fourth keys in the list, the RunOnce keys:

Beginning with Windows XP, the values in the RunOnce keys are run only if the user has permission to delete entries from the respective key. The programs in the RunOnce key are run sequentially. Explorer waits until each one has exited before continuing with normal startup. By default, Run keys are ignored when the computer starts in Safe mode. Under the RunOnce keys, you can prefix a value name with an asterisk (*) to force the associated program to run even in Safe mode.

You can prefix a RunOnce value name with an exclamation point (!) to defer deletion of the value until after the command runs. Without the exclamation point prefix, a RunOnce value is deleted before the command runs. As a result, if a RunOnce operation does not run properly, the associated program is not asked to run the next time you start the computer.

If more than one program is registered under any particular key, the order in which those programs are run is indeterminate. A program run from any of these keys should not write to the key during its execution. Doing so will interfere with the execution of other programs registered under the key. Furthermore, applications should use the RunOnce keys only for transient conditions (such as to complete application setup); an application must not continually re-create entries under RunOnce. Doing so will interfere with Windows Setup.

Das könnte Ihnen auch gefallen