:: 隐藏任务栏Cortana
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f >nul
:: 资源管理器打开显示"此电脑"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f >nul
:: 总是从内存卸载无用DLL
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "AlwaysUnloadDLL" /t REG_DWORD /d 1 /f >nul
:: 禁止跟踪损坏的快捷方式
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoResolveTrack" /t REG_DWORD /d 1 /f >nul
:: 优化文件列表刷新策略
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "ForegroundLockTimeout" /t REG_DWORD /d 0 /f >nul
:: 创建快捷方式不添加"快捷方式"字样
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "link" /t REG_BINARY /d 00000000 /f >nul
:: 禁止自动播放
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f >nul
:: 在单独进程中打开文件夹
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SeparateProcess" /t REG_DWORD /d 1 /f >nul
:: 快速访问不显示常用文件夹
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowFrequent" /t REG_DWORD /d 0 /f >nul
:: 快速访问不显示最近使用文件
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /t REG_DWORD /d 0 /f >nul
:: 语言栏隐藏到任务栏
reg add "HKEY_CURRENT_USER\Software\Microsoft\CTF\LangBar" /v "ShowStatus" /t REG_DWORD /d 3 /f >nul
:: 隐藏语言栏帮助按钮
reg add "HKEY_CURRENT_USER\Software\Microsoft\CTF\LangBar" /v "ExtraIconsOnMinimized" /t REG_DWORD /d 0 /f >nul
:: 资源管理器崩溃自动重启
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoRestartShell" /t REG_DWORD /d 1 /f >nul
:: 显示文件扩展名
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f >nul
:: 桌面显示"此电脑"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0 /f >nul
:: 桌面显示"回收站"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{645FF040-5081-101B-9F08-00AA002F954E}" /t REG_DWORD /d 0 /f >nul
:: 禁用兼容性疑难解答右键菜单
reg delete "HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\Compatibility" /f >nul 2>&1
:: 禁用Windows Defender扫描右键菜单
reg delete "HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\EPP" /f >nul 2>&1
:: 禁用新建联系人右键菜单
reg delete "HKEY_CLASSES_ROOT\.contact\ShellNew" /f >nul 2>&1
:: 禁用"还原先前版本"右键菜单
reg delete "HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}" /f >nul 2>&1
:: 禁用"刻录到光盘"右键菜单
reg delete "HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\{B327765E-D724-4347-8B16-78AE18552FC3}" /f >nul 2>&1
:: 禁用"授予访问权限"右键菜单
reg delete "HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\Sharing" /f >nul 2>&1
:: 禁用"始终脱机可用"右键菜单
reg delete "HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\Offline Files" /f >nul 2>&1
:: 禁用工作文件夹右键菜单
reg delete "HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\WorkFolders" /f >nul 2>&1
:: 禁用画图3D右键菜单
reg delete "HKEY_CLASSES_ROOT\SystemFileAssociations\.3mf\Shell\3D Edit" /f >nul 2>&1
:: 禁用"包含到库中"右键菜单
reg delete "HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\Library Location" /f >nul 2>&1
:: 禁用开始菜单常用应用
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d 0 /f >nul
:: 禁用开始菜单最近添加应用
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d 0 /f >nul
:: 记事本启用自动换行
reg add "HKEY_CURRENT_USER\Software\Microsoft\Notepad" /v "fWrap" /t REG_DWORD /d 1 /f >nul
:: 记事本显示状态栏
reg add "HKEY_CURRENT_USER\Software\Microsoft\Notepad" /v "StatusBar" /t REG_DWORD /d 1 /f >nul
:: 退出时清除最近打开文档
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ClearRecentDocsOnExit" /t REG_DWORD /d 1 /f >nul
:: 性能优化设置:: 不允许在开始菜单显示建议
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f >nul
:: 不要在应用商店中查找关联应用
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f >nul
:: 关闭商店应用推广
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f >nul
:: 关闭锁屏时的Windows聚焦推广
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenEnabled" /t REG_DWORD /d 0 /f >nul
:: 关闭"使用Windows时获取技巧和建议"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f >nul
:: 关闭游戏录制工具
reg add "HKEY_CURRENT_USER\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d 0 /f >nul
:: 关闭多嘴的小娜
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f >nul
:: 加快关机速度
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "1000" /f >nul
:: 缩短关闭服务等待时间
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "ServicesPipeTimeout" /t REG_DWORD /d 2000 /f >nul
:: 禁用程序兼容性助手
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "PcaSvc" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "PcaSvc" >nul 2>&1
:: 禁用诊断服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "DPS" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "DPS" >nul 2>&1
:: 禁用SysMain
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "SysMain" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "SysMain" >nul 2>&1
:: 禁用Windows Search
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "WSearch" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "WSearch" >nul 2>&1
:: 禁用错误报告
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f >nul
:: 禁用客户体验改善计划
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f >nul
:: 禁用NTFS链接跟踪服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "TrkWks" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "TrkWks" >nul 2>&1
:: 禁止自动维护计划
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v "MaintenanceDisabled" /t REG_DWORD /d 1 /f >nul
:: 启用大系统缓存以提高性能
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "LargeSystemCache" /t REG_DWORD /d 1 /f >nul
:: 禁止系统内核与驱动程序分页到硬盘
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "DisablePagingExecutive" /t REG_DWORD /d 1 /f >nul
:: 将文件管理系统缓存增加至256MB
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "IoPageLockLimit" /t REG_DWORD /d 4194304 /f >nul
:: 将Windows预读调整为关闭预读
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v "EnablePrefetcher" /t REG_DWORD /d 0 /f >nul
:: VHD启动时节省磁盘空间
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FsDepends\Parameters" /v "VirtualDiskExpandOnMount" /t REG_DWORD /d 4 /f >nul
:: 关闭系统自动调试功能
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v "Auto" /t REG_DWORD /d 0 /f >nul
:: 将磁盘错误检查等待时间缩短到五秒
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "AutoChkTimeOut" /t REG_DWORD /d 5 /f >nul
:: 设备安装禁止创建系统还原点
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Settings" /v "DisableSystemRestore" /t REG_DWORD /d 1 /f >nul
:: 弹出USB磁盘后彻底断开电源
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v "DisableOnSoftRemove" /t REG_DWORD /d 0 /f >nul
:: 关闭快速启动
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v "HiberbootEnabled" /t REG_DWORD /d 0 /f >nul
:: 关闭休眠
powercfg /h off >nul
:: 根据语言设置隐藏字体
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\MitigationOptions" /v "MitigationOptions_FontBocking" /t REG_SZ /d "10000000000000000000000000000000" /f >nul
:: 微软拼音输入法关闭云计算
reg add "HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS" /v "CloudCandidate" /t REG_DWORD /d 0 /f >nul
:: 禁用内容传递优化服务
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DownloadMode" /t REG_DWORD /d 0 /f >nul
:: 禁用SmartScreen筛选器
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t REG_DWORD /d 0 /f >nul
:: 禁用Windows安全中心报告
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Security Health\Platform" /v "Registered" /t REG_DWORD /d 0 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows Security Health\State" /v "Disabled" /t REG_DWORD /d 1 /f >nul
:: 禁用Edge浏览器SmartScreen
reg add "HKEY_CURRENT_USER\Software\Microsoft\Edge" /v "SmartScreenEnabled" /t REG_DWORD /d 0 /f >nul
:: 禁用文件资源管理器SmartScreen
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "off" /f >nul
:: 禁用Microsoft Store应用SmartScreen
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f >nul
:: 禁用UAC(用户账户控制)
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0 /f >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d 0 /f >nul
:: 关闭防火墙
netsh advfirewall set allprofiles state off >nul
:: 关闭默认共享
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "AutoShareWks" /t REG_DWORD /d 0 /f >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "AutoShareServer" /t REG_DWORD /d 0 /f >nul
:: 关闭远程协助
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowToGetHelp" /t REG_DWORD /d 0 /f >nul
:: 启用硬件加速GPU计划
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v "HwSchMode" /t REG_DWORD /d 2 /f >nul
:: 优化处理器性能和内存设置
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl" /v "Win32PrioritySeparation" /t REG_DWORD /d 38 /f >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl" /v "IRQ8Priority" /t REG_DWORD /d 1 /f >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl" /v "IRQ16Priority" /t REG_DWORD /d 2 /f >nul
:: 降低Cortana性能减少CPU占用
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f >nul
:: 关闭广告ID
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d 1 /f >nul
:: 关闭应用启动跟踪
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d 0 /f >nul
:: 去除搜索页面信息流和热搜
reg add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer" /v "DisableSearchBoxSuggestions" /t REG_DWORD /d 1 /f >nul
:: 禁用高精度事件定时器(HPET)
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hpet" /v "Start" /t REG_DWORD /d 4 /f >nul
:: 禁用Game Bar
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d 0 /f >nul
:: 禁用远程修改注册表
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg" /v "RemoteRegAccess" /t REG_DWORD /d 0 /f >nul
:: 禁用保留空间
DISM.exe /Online /Set-ReservedStorageState /State:Disabled >nul 2>&1
:: 禁用上下文菜单显示延迟
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "MenuShowDelay" /t REG_SZ /d "0" /f >nul
:: 禁用蓝屏后自动重启
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v "AutoReboot" /t REG_DWORD /d 0 /f >nul
:: 禁用Installer detection
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableInstallerDetection" /t REG_DWORD /d 0 /f >nul
:: 禁用功能更新安全措施
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX" /v "IsConvergedUpdateStackEnabled" /t REG_DWORD /d 0 /f >nul
:: 禁用交付优化
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" /v "SystemSettingsDownloadMode" /t REG_DWORD /d 0 /f >nul
:: 禁用微软客户体验改进计划
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f >nul
:: 禁用遥测服务
sc config "DiagTrack" start= disabled >nul
sc stop "DiagTrack" >nul
:: 禁用错误报告(WER)
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f >nul
:: 禁用语音激活(Cortana)
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsActivateWithVoice" /t REG_DWORD /d 2 /f >nul
:: 禁用位置服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocation" /t REG_DWORD /d 1 /f >nul
:: 禁用搜索数据收集
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f >nul
:: 禁用定向广告
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f >nul
:: 禁用Wi-Fi感知
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\Local" /v "fBlockNonDomain" /t REG_DWORD /d 1 /f >nul
:: 禁用步骤记录器
reg add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\ProblemReports" /v "DisableProblemReports" /t REG_DWORD /d 1 /f >nul
:: 禁用写入调试信息
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter" /v "DEFAULT" /t REG_DWORD /d 0 /f >nul
:: 禁用Windows欢迎体验
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableFirstRunAnimate" /t REG_DWORD /d 1 /f >nul
:: 禁用反馈频率
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f >nul
:: 禁用诊断数据收集
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f >nul
:: 禁用写作习惯跟踪
reg add "HKEY_CURRENT_USER\Software\Microsoft\Input\Settings" /v "Inking&TypingPersonalization" /t REG_DWORD /d 0 /f >nul
:: 禁用设置应用建议
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f >nul
:: 禁用Bing搜索结果
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f >nul
:: 禁用搜索历史
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDeviceSearchHistoryEnabled" /t REG_DWORD /d 0 /f >nul
:: 禁用赞助商应用安装
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableThirdPartySuggestions" /t REG_DWORD /d 1 /f >nul
:: 禁用自动连接热点
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\Local" /v "fBlockNonDomain" /t REG_DWORD /d 1 /f >nul
:: 禁用输入数据个性化
reg add "HKEY_CURRENT_USER\Software\Microsoft\Personalization\Settings" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f >nul
:: 禁用键入见解
reg add "HKEY_CURRENT_USER\Software\Microsoft\Input\Settings" /v "EnableTypingInsights" /t REG_DWORD /d 0 /f >nul
:: 禁用预安装应用
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "DisablePreInstalledApps" /t REG_DWORD /d 1 /f >nul
:: 禁用.NET遥测
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "DisableNetFrameworkTelemetry" /t REG_DWORD /d 1 /f >nul
:: 禁用PowerShell遥测
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell" /v "EnablePowerShellTelemetry" /t REG_DWORD /d 0 /f >nul
:: 禁用自动安装推荐的应用程序
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v "AutoDownload" /t REG_DWORD /d 2 /f >nul
:: 禁止Win10/11进行大版本更新
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableOSUpgrade" /t REG_DWORD /d 1 /f >nul
:: Windows更新不包括恶意软件删除工具
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ExcludeWUDriversInQualityUpdate" /t REG_DWORD /d 1 /f >nul
:: 禁用自动更新商店应用
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore" /v "AutoDownload" /t REG_DWORD /d 2 /f >nul
:: 禁用自动更新地图
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Maps" /v "AutoDownloadAndUpdateMapData" /t REG_DWORD /d 0 /f >nul
:: 禁用程序兼容性助手
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "PcaSvc" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "PcaSvc" >nul 2>&1
:: 禁用诊断服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "DPS" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "DPS" >nul 2>&1
:: 禁用SysMain (SuperFetch服务)
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "SysMain" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "SysMain" >nul 2>&1
:: 禁用Windows Search
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "WSearch" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "WSearch" >nul 2>&1
:: 禁用NTFS链接跟踪服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "TrkWks" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "TrkWks" >nul 2>&1
:: 禁用诊断服务主机
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "WdiServiceHost" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "WdiServiceHost" >nul 2>&1
:: 禁用诊断系统主机
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "WdiSystemHost" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "WdiSystemHost" >nul 2>&1
:: 设置手动: MapsBroker (地图服务)
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "MapsBroker" start= demand >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "MapsBroker" >nul 2>&1
:: 禁用诊断中心收集器
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "diagnosticshub.standardcollector.service" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "diagnosticshub.standardcollector.service" >nul 2>&1
:: 禁用IP助手服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "iphlpsvc" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "iphlpsvc" >nul 2>&1
:: 禁用SMS路由器服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "SmsRouter" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "SmsRouter" >nul 2>&1
:: 设置手动: Shell硬件检测
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "ShellHWDetection" start= demand >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "ShellHWDetection" >nul 2>&1
:: 设置手动: 任务计划服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "Schedule" start= demand >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "Schedule" >nul 2>&1
:: 禁用Windows事件收集服务
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc config "Wecsvc" start= disabled >nul
"%~dp0NSudoLG.exe" -U:T -P:E -ShowWindowMode:Hide sc stop "Wecsvc" >nul 2>&1
:: 禁用遥测服务
sc config "DiagTrack" start= disabled >nul
sc stop "DiagTrack" >nul
:: 停止更新到2999年
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "FlightSettingsMaxPauseDays" /t REG_SZ /d "7152" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "PauseFeatureUpdatesStartTime" /t REG_SZ /d "2024-01-01T10:00:52Z" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "PauseFeatureUpdatesEndTime" /t REG_SZ /d "2999-12-01T09:59:52Z" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "PauseQualityUpdatesStartTime" /t REG_SZ /d "2024-01-01T10:00:52Z" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "PauseQualityUpdatesEndTime" /t REG_SZ /d "2999-12-01T09:59:52Z" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "PauseUpdatesStartTime" /t REG_SZ /d "2024-01-01T09:59:52Z" /f >nulreg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "PauseUpdatesExpiryTime" /t REG_SZ /d "2999-12-01T09:59:52Z" /f >nul