Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/179365

From BetaArchive Wiki

INFO: Run, RunOnce, RunServices, RunServicesOnce and Startup

Q179365



The information in this article applies to:


  • Microsoft Windows NT Server versions 3.51, 4.0
  • Microsoft Windows NT Workstation versions 3.51, 4.0
  • Microsoft Windows 95
  • Microsoft Windows 98
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows Millennium Edition





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 supplements the following article in the Microsoft Knowledge Base:

Q137367 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 and Windows 98, where all keys are supported, the keys are loaded in the following order:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce


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 an undefined order.

Because 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.

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 computer 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. Other than this exception, the above description applies to Windows NT 4.0 and Windows 2000.

The RunOnce key is not supported by Windows NT 3.51.



REFERENCES

For additional information on the RunOnceEx key, click the article number below to view the article in the Microsoft Knowledge Base:

Q232487 Description of RunOnceEx Registry Key

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

Q137367 Definition of the RunOnce Keys in the Registry

Additional query words: Run RunOnce RunServices RunServicesOnce Startup registry

Keywords : kbKernBase kbRegistry _IK kbshell kbGrpDSKernBase
Issue type : kbinfo
Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT351xsearch kbWinNT400xsearch kbWinNTW351xsearch kbWinNTW351 kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbWinNTSsearch kbWinNTS400xsearch kbWinNTS400 kbWinNTS351 kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWinNTS351xsearch kbWinMEsearch kbWin95search kbWin98search kbWinAdvServSearch kbZNotKeyword3 kbWin98 kbWinME


Last Reviewed: December 16, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.