管理 Windows 启动项:启动文件夹与服务
控制 Windows 开机时运行的内容:打开启动文件夹、修改服务启动类型,并处理快速启动带来的干扰。
快速开始
Windows 的自启程序主要有两个来源:启动文件夹(分当前用户和所有用户)和后台服务。本清单依次介绍这两处,还会提到可能掩盖更改效果的快速启动设置。
打开启动文件夹,查看登录时自动运行的程序
放在这里 shortcuts 的程序会在你每次登录时自动启动。打开 shell:startup 查看当前用户的启动项,或打开 shell:common startup 查看所有用户的。能看到弹出的资源管理器窗口列出启动快捷方式,就可以添加或删除它们。
用 shell:startup(当前用户)或 shell:common startup(所有用户)打开启动文件夹,添加或删除开机自启动程序。
$ explorer shell:startup
explorer shell:common startup▾ 撤销
$ Delete the shortcut from the Startup folder.管理开机自启的后台服务
并非所有自启程序都在启动文件夹里——很多是 Windows 服务。用 Set-Service 可以把服务设为 Disabled(禁用)、Manual(按需启动)或 Automatic(自动)。重新打开服务属性,确认启动类型已更改即说明成功。
用 Set-Service 设置服务开机自启、按需启动或永久禁用。
$ Set-Service -Name spooler -StartupType Disabled :: also valid: Manual, Automatic, AutomaticDelayedStart▾ 撤销
$ Set-Service -Name spooler -StartupType Automatic如果启动项更改似乎不生效,检查快速启动
快速启动(混合启动)意味着关机并不会完全结束会话,所以启动项的更改可能看起来没生效。通过 HiberbootEnabled 注册表值关闭它可强制完全重启。如果关机后再开机明显变慢但更彻底,说明已生效。注意这是中等风险的注册表修改,修改后需重启。
通过 HiberbootEnabled 注册表值关闭或重新开启快速启动,解决关机不彻底、双系统、更新卡住等问题。
$ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f▾ 撤销
$ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 1 /f如何确认已解决
注销后重新登录(或重启):已删除的启动项不应再运行,设为禁用的服务也不应处于运行状态。
一键全部撤销
上面每一条命令都可以撤销。按此顺序执行即可全部还原。
$ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 1 /f
Set-Service -Name spooler -StartupType Automatic
Delete the shortcut from the Startup folder.执行前请先确认——部分步骤之间可能并非相互独立。
来源
- Windows shell: commands - SS64依据: Lists the shell: constants such as shell:Downloads, shell:sendto and shell:startup that open known Windows folders.
- Set-Service — Configure a Windows service依据: Syntax shows Set-Service -Name <string> -StartupType {Automatic | Manual | Disabled} for changing a service's start mode.
- Start - SS64依据: start launches shell: locations; document shortcuts placed in Startup folders run at logon.
- Set-Service依据: Documents the -StartupType parameter with values Automatic, Manual, Disabled (and AutomaticDelayedStart) for controlling when a service starts.
- Distinguishing Fast Startup from Wake-from-Hibernation依据: Explains that Fast Startup is a hybrid shutdown that hibernates the kernel session, so restart and full shutdown behave differently.
- powercfg - SS64依据: Documents powercfg /hibernate, which must be enabled for Fast Startup's kernel hibernation file to exist.
最后验证: 2026-09-21