UpdateLock README

The project's README from github.com/hhht110/UpdateLock. As one markdown file: README.md.

Win7/10/11 自动更新关闭工具

一个原生 C++/Win32 单文件工具,自动识别 Windows 7、Windows 10 或 Windows 11,并使用对应策略关闭 Windows Update。

主要特性

系统策略

Windows 7

只处理:

不会处理 BITS、CryptSvc、TrustedInstaller、SoftwareDistribution、Catroot2 或系统文件。

原始状态保存到:

%ProgramData%\UpdateLock\windows7-original-state-v1.txt

Windows 10 / Windows 11

处理原六项策略:

2.1 额外设置:

该策略会隐藏或禁用 Windows Update 页面中的手动检查、下载和安装入口。Win10/11 不停止 wuauserv、BITS、UsoSvc、WaaSMedicSvc 或 Update Orchestrator。

备份文件:

%ProgramData%\UpdateLock\policy-backup-v1.txt
%ProgramData%\UpdateLock\windows-update-access-backup-v1.txt

原六项备份格式保持兼容,2.1 的访问封锁使用独立备份文件。

重要影响

关闭 Windows Update 驱动更新后,新接入的 USB 或其他硬件可能无法自动在线获取驱动。此时可从硬件厂商官网下载并离线安装驱动,或先恢复更新、安装驱动后再重新关闭。

不要在系统正在安装或卸载更新时运行关闭或恢复操作。

构建

需要 Visual Studio Build Tools、MSVC v141 工具链和 Windows 10 SDK 19041。在 native 目录运行:

build-native.cmd

构建输出位于 native\build。脚本同时生成 UpdateLock.exe 和只使用临时目录的原生测试程序。

下载与校验

普通用户请从 GitHub Releases 下载单文件 EXE,并使用 Release 中公布的 SHA-256 校验文件完整性。

当前 EXE 的作者元数据为“啊常用户”,但尚未使用受信任的 Authenticode 证书签名,因此 Windows 仍可能提示“未知发布者”或显示 SmartScreen 警告。

验证边界

已完成原生构建、单元测试和二进制依赖检查。不同补丁级别和定制系统可能存在行为差异,真实机器操作前应确保重要数据已有备份。

UpdateLock (hhht110/UpdateLock)

Searching Database…

What is this?This is a native Windows utility that automatically detects whether you're on Windows 7, 10, or 11, and applies the matching registry/service policies to turn off Windows Update, with a one-click way to undo it.
Is this an installer, a script, or something else?It's a single standalone native Win32 EXE, not an installer or a script - no .NET and no extra runtime dependencies are required to run it.
How do I get it running?Download the prebuilt UpdateLock.exe from the GitHub Releases page, verify it against the published SHA-256 checksum, then run it with administrator rights.
Do I need to install anything first?Just running the released EXE needs nothing else - it's statically linked. Building it yourself from source requires Visual Studio Build Tools, the MSVC v141 toolchain, and the Windows 10 SDK 19041.
What's the main catch with turning updates off?With driver updates disabled, newly plugged-in USB or other hardware may not auto-fetch drivers online, so you'd install drivers offline or briefly re-enable updates. The EXE also isn't signed yet with a trusted Authenticode certificate, so Windows may show an 'unknown publisher' or SmartScreen warning.
Which Windows versions does it actually support?It targets Windows only, specifically Windows 7 SP1, Windows 10, and Windows 11, each handled with version-specific policies via its own detection logic.
What exactly gets changed on Windows 7 versus Windows 10/11?On Win7 it only touches NoAutoUpdate, DisableWindowsUpdateAccess, and stops/disables the wuauserv service. On Win10/11 it manages six policies like NoAutoUpdate, AUOptions, and NoAutoRebootWithLoggedOnUsers, plus an optional SetDisableUXWUAccess=1 setting that hides the manual check/install controls in the Update page, without stopping BITS or UsoSvc.
Can I undo the changes later?Yes - before making any change it saves your original settings to a backup file, and offers one-click restore with write-then-read verification and automatic rollback if something fails.
Does it rely on PowerShell or sc.exe under the hood?No, it talks to Windows directly via the Win32 Registry API and the Service Control Manager API, and never shells out to PowerShell, CMD, reg.exe, or sc.exe.
Is it safe to run while Windows is mid-update?No - the README warns not to run the disable or restore operation while the system is actively installing or uninstalling updates, and recommends backing up important data before using it on a real machine.
Creator
hhht110
Size
0.3 MB
Stars
209
Age
2mo
Commits · 90 Days