安装阶段跳过联网账户/启用本地账户
shift+f10调出cmd,输入regedit打开注册表,找到:计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE,新建Dword项HideWirelessSetupInOOBE,值给1
进入系统后可以停止bitlocker
卸载edge和小组件/阻止gamebar后台录制
务必提前装好其他浏览器再操作!!!
1。 管理员运行cmd,复制以下:
# ============================================
# 启用卸载功能脚本(含备份)
# ============================================
$jsonPath = "C:\Windows\System32\IntegratedServicesRegionPolicySet.json"
$backupPath = "C:\Windows\System32\IntegratedServicesRegionPolicySet.json.bak"
# -------------------------------
# 1. 检查管理员权限
# -------------------------------
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
if (-not $principal.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
Write-Error "请以管理员身份运行此 PowerShell"
exit
}
# -------------------------------
# 2. 取得文件所有权
# -------------------------------
Write-Host "获取文件所有权..."
takeown /f $jsonPath
icacls $jsonPath /grant administrators:F
# -------------------------------
# 3. 备份原文件
# -------------------------------
Write-Host "备份原文件到 $backupPath"
$backupDir = Split-Path $backupPath
if (-not (Test-Path $backupDir)) { New-Item -ItemType Directory -Path $backupDir -Force }
Copy-Item -Path $jsonPath -Destination $backupPath -Force
# -------------------------------
# 4. 读取 JSON 并修改 policies 数组
# -------------------------------
Write-Host "读取并修改 JSON 文件..."
$jsonContent = Get-Content $jsonPath -Raw | ConvertFrom-Json
# 从注册表获取当前地理位置代码
$geoCode = (Get-ItemProperty -Path 'Registry::HKEY_USERS\.DEFAULT\Control Panel\International\Geo' -Name Name).Name
Write-Host "当前注册表 Geo 地区代码:$geoCode"
# 遍历 policies 数组
foreach ($policy in $jsonContent.policies) {
if ($policy.'$comment' -eq 'Edge is uninstallable.') {
# 修改 defaultState
$policy.defaultState = 'enabled'
# 修改 enabled 数组,加入注册表获取的地区代码
$enabledArray = $policy.conditions.region.enabled
if (-not ($enabledArray -contains $geoCode)) {
$enabledArray = @($geoCode) + $enabledArray
}
$policy.conditions.region.enabled = $enabledArray
Write-Host "修改完成:$($policy.'$comment')"
}
}
# 保存回文件
$jsonContent | ConvertTo-Json -Depth 10 | Set-Content $jsonPath -Encoding UTF8
# -------------------------------
# 5. 恢复 TrustedInstaller 权限
# -------------------------------
Write-Host "恢复 TrustedInstaller 权限..."
icacls $jsonPath /setowner "NT SERVICE\TrustedInstaller"
icacls $jsonPath /grant:r "NT SERVICE\TrustedInstaller:(F)" /inheritance:e
Write-Host "操作完成,原文件已备份到 $backupPath"
# -------------------------------
# 6. 修改注册表,允许 Edge 可卸载
# -------------------------------
Write-Host "修改注册表:允许 Microsoft Edge 可卸载..."
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /v NoRemove /t REG_DWORD /d 0 /f
随后可去控制面板正常卸载edge。
2。 管理员模式启动cmd,输入:
winget uninstall "windows web experience pack"
win+r运行gpedit.msc,找到计算机配置 -> 管理模板 -> windows组件 -> 小组件,找到“允许小组件”,选择已禁用
3。 管理员模式启动cmd,输入:
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "0" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d "0" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d "0" /f
关闭vbs(基于虚拟化的安全性)
在windows安全中心 -> 设备安全性 -> 内核隔离详细信息 -> 关闭内存完整性
win+r,运行输入regedit,导航至:计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard,将EnableVirtualizationBasedSecurity项的值改为0
隐私与遥测深度优化
-
组策略配置
Win+R 输入 gpedit.msc,依次进入:
计算机配置 → 管理模板 → Windows 组件 → 数据收集和预览版本 → 「允许诊断数据」
选择「已启用」,选项设为发送所需的诊断数据
计算机配置 → 管理模板 → Windows 组件 → Windows 错误报告 → 「禁用 Windows 错误报告」
选择「已启用」 -
系统设置调整
打开「设置 → 隐私和安全性 → 诊断和反馈」:
反馈频率改为「从不」
关闭「改进墨迹书写和键入」等所有可选上报开关 -
命令行禁用核心遥测服务
以管理员身份运行 CMD,复制以下执行:sc config DiagTrack start= disabled sc stop DiagTrack sc config WerSvc start= disabled sc stop WerSvc sc config dmwappushservice start= disabled sc stop dmwappushservice -
利用pstools禁用相任务计划
下载pstools,下载地址:https://download.sysinternals.com/files/PSTools.zip
解压后管理员运行cmd,并cd进这个目录,运行PsExec.exe -i -s %windir%\system32\mmc.exe /s taskschd.msc禁用Application Experience、Customer Experience Improvement Program、Diagnostics、Windows Error Reporting四个文件夹中的全部任务(期间遇到报错重新运行上面的命令打开任务计划程序即可)
系统服务精简
| 以下列出的服务都可以安全禁用 | 服务显示名 | 服务名 | 备注 |
|---|---|---|---|
| Connected User Experiences and Telemetry | DiagTrack | 系统遥测核心服务 | |
| Diagnostic Policy Service | DPS | 系统诊断与问题检测 | |
| DialogBlockingService | DialogBlockingService | 对话框阻止服务 | |
| Distributed Link Tracking Client | TrkWks | NTFS 文件跨设备链接维护 | |
| Downloaded Maps Manager | MapsBroker | 离线地图数据管理 | |
| Geolocation Service | lfsvc | 系统定位与地理围栏 | |
| Microsoft App-V Client | AppVClient | 应用虚拟化客户端 | |
| Microsoft 键盘筛选器 | MsKeyboardFilter | 击键筛选与映射 | |
| Net.Tcp Port Sharing Service | NetTcpPortSharing | TCP 端口共享服务 | |
| Network Connected Devices Auto-Setup | NcdAutoSetup | 网络设备自动发现安装 | |
| Offline Files | CscService | 脱机文件缓存 | |
| OpenSSH Authentication Agent | ssh-agent | SSH 密钥代理 | |
| Program Compatibility Assistant Service | PcaSvc | 程序兼容助手 | |
| Remote Registry | RemoteRegistry | 远程修改注册表 | |
| Routing and Remote Access | RemoteAccess | 路由与远程访问 | |
| Shared PC Account Manager | SharedPCAccountManagerService | 共享设备账户管理 | |
| SysMain | SysMain | 系统预读缓存(SSD 下无收益) | |
| TCP/IP NetBIOS Helper | lmhosts | 无局域网共享可禁用 | |
| User Experience Virtualization Service | UevAgentService | 用户体验虚拟化 | |
| Windows Biometric Service | WbioSrvc | 指纹 / 人脸生物识别 | |
| Windows Error Reporting Service | WerSvc | 错误报告上传 | |
| Windows Search | WSearch | 文件索引与搜索 | |
| 零售演示服务 | RetailDemoService | 门店演示模式 | |
| 设备管理 WAP 推送消息路由服务 | dmwappushservice | 移动设备管理推送 | |
| 自动时区更新程序 | tzautoupdate | 自动同步系统时区 | |
| Fax | Fax | 传真服务,Pro 版专属,桌面端无用 | |
| 数字钱包服务 | WalletService | NFC 支付 / 电子卡,Pro 版专属 |