Mobile wallpaper 1
493 字
2 分钟
(附脚本)win10/11禁止更新(延长更新时间到9999天)

教程#

  1. 添加注册表值win+R,运行,输入regedit

  2. 打开注册表编辑器依次进入以下路径计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings

  3. 在Settings项中,新建DWORD(32位)值(D),重命名为以下命名FlightSettingsMaxPauseDays

  4. 双击修改过的命名项,修改基数设为十进制,修改数值数据为9999

  5. win+R,输入cmd,粘贴运行以下命令:
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v FlightSettingsMaxPauseDays /t reg_dword /d 9999 /f

脚本#

(推荐加上)启动脚本#

@echo off
:: 以管理员权限运行DisableWin10-11UpdatePause9999.ps1
:: 请把本文件(Run.bat) 和 DisableWin10UpdatePause9999.ps1 放在同一个目录
set script=%~dp0DisableWin10-11UpdatePause9999.ps1
net session >nul 2>&1
if %errorLevel% neq 0 (
echo 正在请求管理员权限...
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
exit /b
)
powershell -ExecutionPolicy Bypass -File "%script%"
pause

ps脚本代码#

DisableWin10-11UpdatePause9999.ps1
# 作用:修改FlightSettingsMaxPauseDays为9999
# 需要管理员权限运行
<#
.SYNOPSIS
Windows10/11暂停更新9999天脚本
.AUTHOR
IKUN_CXKPRO
Email: ikun_cxkpro@163.com
.VERSION
1.0.0
.LASTUPDATE
2025/12/6 23:37
.NOTES
1) 需以管理员身份运行
2) 此操作仅提升暂停更新上限,不等同于彻底关闭更新服务
3) 如需恢复默认,请直接把FlightSettingsMaxPauseDays改回 35/0
#>
$regPath = "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings"
$valueName = "FlightSettingsMaxPauseDays"
$valueData = 9999
# 管理员权限检测
function Test-Admin {
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
}
if (-not (Test-Admin)) {
Write-Host "请以管理员身份运行此脚本!" -ForegroundColor Red
Write-Host "右键 PowerShell -> 以管理员身份运行,然后再执行。" -ForegroundColor Yellow
exit 1
}
try {
# 检测注册表路径是否存在
if (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
}
# 写入/更新 DWORD 值
New-ItemProperty `
-Path $regPath `
-Name $valueName `
-PropertyType DWord `
-Value $valueData `
-Force | Out-Null
# 校验
$readBack = (Get-ItemProperty -Path $regPath -Name $valueName).$valueName
if ($readBack -eq $valueData) {
Write-Host "设置成功:$valueName = $readBack" -ForegroundColor Green
Write-Host "现在 Windows 更新的“暂停更新”上限已提升到 9999 天。" -ForegroundColor Green
} else {
Write-Host "设置可能未生效,当前值:$readBack" -ForegroundColor Yellow
}
}
catch {
Write-Host "发生错误:$($_.Exception.Message)" -ForegroundColor Red
exit 2
}
Write-Host "完成。你可以关闭窗口。" -ForegroundColor Cyan
(附脚本)win10/11禁止更新(延长更新时间到9999天)
https://ikun-cxkpro.top/posts/附脚本win10禁止更新延长更新时间到9999天/
作者
IKUN_CXKPRO
发布于
2025-12-06
许可协议
CC BY-NC-SA 4.0

部分信息可能已经过时

封面
Sample Song
Sample Artist
封面
Sample Song
Sample Artist
0:00 / 0:00