Windows 7启动自动运行程序的位置

应该说,很多位置是从Windows 2000开始的,有的甚至是Windows 3.1的历史了,但是Windows 7仍然在继续发扬光大着。设置Windows程序能够在系统启动时自动运行的方式有很多,这些启动方式被Windows藏在了许多地方,也是在系统维护中需要重点关照的地方。

1、HKLM\Software\Microsoft\Windows\CurrentVersion\Run,这个位置的程序面对系统的所有用户有效

2、HKCU\Software\Microsoft\Windows\CurrentVersion\Run,这个位置的程序对当前用户登录有效,同样,还可能是在HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Run

3、HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows,Load值,当用户登录时加载的程序

4、计划任务,可以定义任务在系统启动时运行

5、Win.ini,其中[Windows]部分的Load= 和 Run= 是16位Windows版本添加命令的地方

6、启动时一次性运行的位置,HKLM针对系统,HKCU针对用户
● HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
● HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
● HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
● HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

7、RunServices 和 RunServicesOnce,可以控制自动启动的服务,能设置为针对系统或指定的用户

8、HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit 和 HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell,控制用户登录后自动启动的程序

9、组策略,运行gpedit.msc,Computer Confguration\Administrative Templates\System\Logon 和 User Confguration\Administrative Templates\System\Logon,其中的Run These Programs At User Logon可以列出用户登录时运行的程序

10、HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run 或 HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run,使用策略设置指定启动的程序

11、HKLM\System\CurrentControlSet\Control\Session Manager,BootExecute的默认值是“autocheck autochk *”,用于系统非正常关闭后检查文件系统的一致性,也可能被加入其它程序或进程(注意:如果删除默认值,可能会在系统重启后停止响应)

12、Shell服务对象,Windows加载的动态链接库(DLL)

13、启动脚本,会在系统启动时自动运行,组策略编辑位置在Computer Confguration\Windows Settings\Scripts (Startup/Shutdown) 和 User Confguration\Windows Settings\Scripts (Logon/Logoff)