Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


December 2002

Windows Program Startup Locations

Learn how Windows controls autorun programs
RSS
Subscribe to Windows IT Pro | See More Administration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Hunting down and stopping programs that launch themselves at system startup whether you want them to or not is a pain. Windows can automatically start programs according to two folders and eight core registry subkeys. Here are the 10 locations from which Windows XP, Windows 2000, and Windows NT can automatically run programs at system startup.

10. The user Startup folder—The user's Startup folder is the most common location for programs that Windows automatically loads at boot time. You can find the user Startup folder at Documents and Settings, user, Start Menu, Programs, Startup. If you've migrated from NT, you'll find the Startup folder at WinNT, Profiles, user, Start Menu, Programs, Startup.

9. The All Users Startup folder—The next most common place to find autostart programs is the All Users Startup folder. Whereas the user Startup folder runs programs for only the user who's logged on, the All Users Startup folder autostarts programs no matter who logs on to the system. You can find this folder at Documents and Settings, All Users, Start Menu, Programs, Startup. If you've migrated from NT, you'll find the folder at WinNT, Profiles, user, Start Menu, Programs, Startup.

8. The load entry—Several registry subkeys also can start programs automatically. One esoteric location is the load entry at HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\Windows\load.

7. The Userinit entry—The Userinit entry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\Userinit, can also initiate programs when the system boots. You'll usually see an entry for userinit.exe, but this subkey can accept multiple comma-separated values (CSVs), so other programs can tack themselves onto the end of the entry.

6. The Explorer\Run entry—Unlike the load and Userinit entries, the Explorer\Run entry works in both the HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE root keys. You can find the Explorer\Run subkey at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run and at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run.

5. The RunServicesOnce subkey—The RunServicesOnce subkey is designed to start service programs before the user logs on and before the other registry autostart subkeys start their programs. You'll find the RunServicesOnce subkey at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce and at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce.

4. The RunServices subkey—The RunServices subkey loads immediately after the RunServicesOnce subkey and runs before the user logs on. You'll find the RunServices subkey at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices and at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices.

3. The RunOnce\Setup subkey—The RunOnce\Setup subkey's default value specifies programs to run after the user logs on. The RunOnce\Setup subkey is in the HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE root keys. You'll find it at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup and at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\Setup.

2. The RunOnce subkey—Setup programs typically use the RunOnce subkey to run programs automatically. You'll find this subkey at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce and at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce. The RunOnce entry in the HKEY_LOCAL_MACHINE root runs associated programs immediately after logon and before the other registry Run entries start their programs. The RunOnce subkey in the HKEY_CURRENT_USER root runs after the OS processes the other registry Run subkeys and the contents of the Startup folder. If you run XP, you can also check the RunOnceEx subkey at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx.

1. The Run subkey—By far the most common registry location for autorun programs is the Run entry, which you'll find at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. The Run entry in the HKEY_LOCAL_MACHINE root runs immediately before the Run entry in the HKEY_CURRENT_USER root, and both subkeys precede the processing of the Startup folder.

End of Article



Reader Comments
Regarding Michael Otey's Top 10: "Windows Program Startup Locations" (December 2002, http://www.winnetmag.com, InstantDoc ID 27100), I hate to say this, but there's an 11th place to look for pesky, unwanted Windows programs. The load and run lines in win.ini, a holdover from the Windows 3.1 days, still work, and many programs lurk there. I run Sysedit to check for real-mode drivers in config.sys and autoexec.bat files at the same time.

Bruce Ballard January 15, 2004


Thank you for this article

Aaron March 22, 2004


Useful but it uses boot and login interchangably when they are not always the same. I want to run something when XP boots, not an hour later when I login. All of these seem to actually run at login time.

Jerry Aguirre May 26, 2004


I wonder why Bruce Ballard would still be running an autoexec.bat and config.sys under Win XP? Neither of them are necessary or desirable.

Richard Driggers June 22, 2004


Maybe its because he knows that some software will create these files and the user wouldn't even know of their existance. So instead of trying to be a smart cocky tosser why don't you try helping others instead of making stupid comments!

Jamesmcuk August 06, 2004 (Article Rating: )


HKLM\System\CurrentControlSet\Control\Session Manager\BootExecute for boot-time loading (see http://snakefoot.fateback.com/tweak/winnt/tips.html, item 9 for details)

Anonymous User November 13, 2004 (Article Rating: )


Thanks for this article Michael.

Rick

Anonymous User December 01, 2004


The RunServices and RunServicesOnce subkeys are NOT supported in Windows 2000/XP, they only work in Win9x/Me.

Anonymous User March 17, 2005 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Microsoft Kills OneCare, Will Launch Free Security Solution

Microsoft on Tuesday announced that it would retire its $50-a-year security subscription product, Windows Live OneCare, and replace it with a free solution codenamed "Morro." Unlike OneCare, however, Morro will focus only on core anti-malware features and ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Xbox 360 Overhaul Arrives with New UI, Avatars

Xbox 360 owners who logon to the system's Xbox Live system this morning will receive the most significant functional change yet to the console's user interface, or dashboard. Dubbed the New Xbox Experience, this new front-end features a completely new ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing