INFO: Run, RunOnce, RunServices, RunServicesOnce and Startup

Last reviewed: January 16, 1998
Article ID: Q179365
The information in this article applies to:
  • Microsoft Windows 95
  • Microsoft Windows NT versions 3.51, 4.0

SUMMARY

This article explains how the Run, RunOnce, RunServices, RunServicesOnce, and RunOnce\Setup registry keys relate to each other and to the Startup Folder. It also describes the order in which these keys are loaded.

The information contained in this article is meant to supplement the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q137367
   TITLE     : Definition of the RunOnce Keys in the Registry

Please see this article for an explanation of each of these keys.

MORE INFORMATION

Under Windows 95, where all keys are supported, the keys are loaded in the following order:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnc e HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices <Logon Prompt> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run StartUp Folder HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce

With the exception of the HKEY_LOCAL_MACHINE\...\RunOnce key, all keys and their entries are loaded asynchronously. Therefore, all entries in the RunServices and RunServicesOnce keys can potentially run at the same time.

Entries in the HKEY_LOCAL_MACHINE\...\RunOnce key are loaded synchronously in the order they were added to the RunOnce key. (This is not necessarily the order in which these entries are displayed by the Registry Editor.)

Since the HKEY_LOCAL_MACHINE\...\RunOnce key is loaded synchronously, all of its entries must finish loading before the HKEY_LOCAL_MACHINE\...\Run, HKEY_CURRENT_USER\...\Run, HKEY_CURRENT_USER\...\RunOnce, and Startup Folder entries can be loaded.

Under Windows 95, the RunServicesOnce and RunServices keys are loaded before the user logs into Windows 95. Because these two keys run asynchronously with the Logon dialog box, they can continue to run after the user has logged on. However, since HKEY_LOCAL_MACHINE\...\RunOnce must load synchronously, its entries will not begin loading until after the RunServicesOnce and RunServices keys have finished loading.

Because of different system configurations (such as a machine that is configured to automatically log on), any application that is dependant upon other applications that are executed under these keys having completed must be prepared to wait until these applications are complete.

The RunServices, RunServicesOnce, and Run\Setup keys are not currently supported by Windows NT and the RunOnce key is not supported by Windows NT 3.51.

REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q137367
   TITLE     : Definition of the RunOnce Keys in the Registry


Additional query words: Run RunOnce RunServices RunServicesOnce Startup
registry
Keywords : BseRegistry
Version : WINDOWS:95; WINNT:3.51,4.0
Platform : WINDOWS winnt
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.