Windows 10

Windows 10

傻逼 Windows 10 是傻逼 Microsoft 有史以来最傻逼的傻逼 Windows 操作系统。

Tweaks

Update: 推荐使用 Ultimate Windows Tweaker 4 这个工具,可以在图形界面里轻松实现一些优化。最新版本是 4.6。

首先,推荐使用傻逼 Windows 10 Enterprise 2019 LTSC x64 en 这个版本。LTSC 版本是相对最好的版本,系统里带的垃圾较少。

严重不推荐任何其它版本:包括 Home版,Pro版,中国特别版等等。下面的一些 Tweak 对 Home / Pro 等版本无效。

要较为不受苦恼地使用傻逼 Windows 10,必须首先经过一番痛苦的设置过程。下面列出一些必备的 Windows 10 Tweak 优化技巧。

注意以下一些 tweak 使用 .reg 导入注册表方式,.reg 文件的编码必须是 ASCII 或 UCS2-LE BOM (带 BOM 的 UTF-16 BMP LE 字符集),不能是(包含非 ASCII 字符的)UTF-8!

最后,请注意以下很多 Tweak 项会严重降低系统安全防护级别,但我认为这是值得的,因为我坚信以下几条原则和理念:

  1. convenience over security,永远不应该为了"安全"而牺牲便利.
  2. (管理员)用户对自己的设备应该拥有完全的控制权(full control), 设备永远不应该自作主张地为了所谓"安全"而限制用户的权限. 用户知道自己在做什么, 举个例子,如果 root 用户在 Linux 终端下执行 rm -rf / 命令,那么设备在确认用户确实想执行这个命令以后,应该毫不犹豫地去执行它,即使设备"知道"这个命令会彻底损坏系统.
  3. 如果设备位于可信任的内网环境之内(比如位于启用了 NAT 和防火墙的家庭路由器之后),那么这个设备应该默认是相对安全的 - 没有任何来自外部网络的主动攻击可以穿透NAT(这里说的 NAT 指普通的端口 NAT (PNAT))。

在进行下面的优化之前,请确保你知道你自己在做什么 (make sure you know what you're doing);

禁用 UAC

首先弄这个,否则后面的每个 Tweak 都会弹 UAC 对话框。烦不胜烦。

参考:禁用 UAC

找回资源管理器里 "Open command window here" 右键菜单

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt]
@="@shell32.dll,-8506"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt]
@="@shell32.dll,-8506"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\cmdprompt]
@="@shell32.dll,-8506"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\cmdprompt\command]
@="cmd.exe /s /k pushd \"%V\""

旧版(已失效):

需要修改注册表

HKEY_CLASSES_ROOT\Directory\shell\PowerShell
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd

在以上两个注册表文件夹,分别将 HideBasedOnVelocityId 键值 rename 为 ShowBasedOnVelocityId 即可。需要先在 Permissions 设置里更改 Owner 并修改权限 full control。修改立即生效。两个路径分别对应资源管理器右击文件夹和右击空白处的 context menu。(由于需要更改权限,无法使用导入 .reg 文件方式修改,傻逼微软!)

此方法只能找回右键菜单里的 "Open command window here",不能把那个傻逼的 "Open PowerShell window here" 菜单去掉!

找回传统风格音量设置面板

傻逼 Windows 10 默认的状态栏托盘音量设置面板极为傻逼,只有一个横条,连直接设置各程序单独音量都做不到。需要找回 Windows 7 风格的竖状音量设置面板。

Old volume applet.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC]
"EnableMtcUvc"=dword:00000000

需要重启资源管理器生效(任务管理器里结束 explorer.exe 进程然后重新创建之)

禁用登录背景画面

傻逼 Windows 10 默认启动 / 锁屏后会显示一个全屏背景画面,必须按下任意键才进入输入密码界面。纯属傻逼设计。

Disable_Lock_Screen.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization]
"NoLockScreen"=dword:00000001

或组策略:

Computer Configuration - Administrative Templates - Control Panel - Personalization - Do not display the lock screen, 设为 Enabled

禁用 Cortana,优化搜索

  • 禁止 Windows 搜索显示 bing 搜索结果
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search]
"BingSearchEnabled"=dword:00000000

旧版:

  • 禁用 Cortana
  • 禁止 Windows 搜索显示 Web 结果
  • 禁止 Windows 搜索使用地理位置信息

Disable_cortana.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]
"AllowCortana"=dword:00000000
"DisableWebSearch"=dword:00000001
"AllowSearchToUseLocation"=dword:00000000

禁用 Windows Defender / Security Center

首先在 Settings - App & Browser control - settings 里禁用 "Check app and files", "Smartscreen for Microsoft Edge", "Smartscreen for Microsoft Store apps" 等全部选项。

然后用 SYSTEM 用户 身份打开 services.msc,禁用并停止以下服务(某些服务可能没有停止按钮,可以先禁用,重启后就不会启动了):

  • Windows Security Service (SecurityHealthService)
  • Windows Defender Advanced Threat Protection Service (Sense)
  • Windows Defender Firewall (mpssvc)
  • Security Center (wscsvc)
  • Microsoft Defender Antivirus Service (WinDefend)
  • Microsoft Defender Antivirus Network Inspection Service (WdNisSvc)

重启生效。

旧版:

彻底、完全禁用 Windows Defender(包括 Firewall 和 Antivirus)。

Disable_Windows_Defender.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SecurityHealthService]
"Start"=dword:00000004
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MpsSvc]
"Start"=dword:00000004
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend]
"Start"=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
"EnableSmartScreen"=dword:00000000

重启后生效。注:MpsSvc 是 Windows Defender Firewall 服务。

禁用 Windows Update

禁止 Update Orchestrator

用 NTFS 权限禁止所有用户访问 %windir%\System32\usocore.dll 这个文件。(需要先取得文件所有权)

这库被 UsoSvc (Update Orchestrator Service) 使用,没了它 UsoSvc 启动不起来,UsoSvc 会自动重新启动 Windows Update 服务。

注:1903以后版本没有 usocore.dll 这个文件,取而代之的是 usoapi.dll, UsoClient.exe, usosvc.dll, usocoreps.dll, usocoreworker.exe 等文件,同样方式禁止其访问权限。

禁用服务

禁用 "Update Orchestrator Service" 和 "Windows Update" 服务

Disable_windows_update.bat (need admin privileges to execute)

sc stop wuauserv
sc stop UsoSvc
sc config wuauserv start = disabled
sc config UsoSvc start = disabled

也可以使用 UI 手工设置:services.msc 打开服务,将 "Update Orchestrator Service" 和 "Windows Update" 两个服务停止并设为禁用。

regedit 里在 "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv" 和 Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsoSvc 这几个路径的 permissions 里增加 Everyone - Deny all 的权限设置。这是傻逼 Windows 10 的 Windows Update 和 Update Orchestrator Service 服务。

禁用计划任务

taskschd.msc 打开计划任务管理器,左侧树状导航里选择 Task Scheduler Library \ Microsoft \ Windows \ WindowsUpdate,将该文件夹里几个计划任务全部右键禁用。

修改注册表

Disable_Windows_10_auto_update.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DoNotConnectToWindowsUpdateInternetLocations"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoUpdate"=dword:00000001

屏蔽更新服务器

修改路由器 dnsmasq 服务器配置文件或本地 hosts,推荐前者。

dnsmasq: /etc/dnsmasq.conf or /etc/dnsmasq.d/anyname.conf

address=/update.microsoft.com/0.0.0.0
address=/download.windowsupdate.com/0.0.0.0

hosts: (Linux: /etc/hosts, Windows: %systemroot%\system32\drivers\etc\hosts)

127.0.0.1 update.microsoft.com
127.0.0.1 download.windowsupdate.com

禁用间谍程序

傻逼 Windows 10 里集成了大量间谍程序,会上传本机数据到 Microsoft 服务器。

禁用 CompatTelRunner.exe

CompatTelRunner.exe (Windows Compatibility Telemetry) 是 Windows 10 里自带的间谍程序,每次开机会自启动然后上传数据到 Microsoft 服务器。

使用计划任务阻止其自运行:

taskschd.msc 打开计划任务管理器,左侧树状导航里选择 Task Scheduler Library \ Microsoft \ Windows \ Application Experience,将该文件夹里几个计划任务全部右键禁用。

禁用 "Customer Experience Improvement Program"

taskschd.msc 打开计划任务管理器,左侧树状导航里选择 Task Scheduler Library \ Microsoft \ Windows \ Customer Experience Improvement Program,将该文件夹里几个计划任务全部右键禁用。

禁用系统通知

打开 Settings => Notifications & actions 页面或通过 ms-settings:notifications 命令进入,

关闭所有通知项

控制面板 - Security and Maintenance,点击左侧边栏“Change Security and Maintenance Settings”,取消所有复选框,点击 OK 保存。

去除 tray 区域的一些垃圾图标

Settings - Turn system icons on or off

取消勾选 "Action Center", "Location"

Task manager - Startup

右击 "Windows Defender notification icon", disable。重启生效。

解除 IE 安全限制

导入以下几个 reg 注册表文件:

DisableIESecuritySettingsCheck.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Security]
"DisableSecuritySettingsCheck"=dword:00000001
"DisableFixSecuritySettings"=dword:00000001  
"DisableSecuritySettings"=dword:00000001

disable_open_file_security_warning.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Associations ]
"LowRiskFileTypes"=".avi;.bat;.cmd;.exe;.htm;.html;.lnk;.mpg;.mpeg;.mov;.mp3;.mp4;.mkv;.msi;.m3u;.rar;.reg;.txt;.vbs;.wav;.zip;.7z"

运行 inetcpl.cpl 打开 Internet 选项,在 "Security" 页面,依次点击"Internet", "Local intranet" 和 "Trusted sites" 三个 zone,对每个 zone,点击 Custom level,更改如下设置:

  • Misc - Launching applications and unsafe files: 设为 Enable
  • Misc - Launching programs and files in an IFRAME: 设为 Enable

禁用影响系统性能的服务

services.msc, 禁用以下服务

  • Background Intelligent Transfer Service
  • Superfetch
  • Windows Search(建议用 everything 取代)
  • HomeGroupListener
  • HomeGroupProvider

regedit

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

OneSyncSvc、OneSyncSvc_XXX、UserDataSvc、UserDataSvc_XXX、UnistoreSvc、UnistoreSvc_XXX 这几个子项里:

将参数 start 值改为 4 (禁止启动)

禁用影响系统性能的计划任务

taskschd.msc 打开计划任务管理器,

左侧树状导航里选择 Task Scheduler Library \Microsoft\Windows\MemoryDiagnostic,右侧面板里右击禁用以下两个计划任务:

  • ProcessMemoryDiagnosticEvents
  • RunFullMemoryDiagnostic

禁用 "Turn on Windows Security Center service" 弹窗

禁用 Windows Security Service 相关服务后,每次系统启动时都会在右下角弹出一个"Turn on Windows Security Center service" 弹窗,非常烦人,傻逼微软!

去除弹窗方法:

资源管理器里打开 %WINDIR%\system32 , 接管 ActionCenter.dll 和 ActionCenterCPL.dll 这两个文件的所有权,然后把这两个文件重命名为其它文件即可。

接管文件所有权方法:安装InstallTakeOwnership.reg,然后在资源管理器里右击文件,选择 Take ownership。

去除资源管理器里的垃圾文件夹

Windows 10 默认在资源管理器里最上方显示了“Music”,“Pictures”,“3D objects”等一堆垃圾快捷方式。用下面的注册表文件将这些垃圾全部去除。(适用于 X64 版 Windows)

64-bit_Remove_All_user_Folders_in_This_PC.reg

Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; http://www.tenforums.com
; Tutorial: http://www.tenforums.com/tutorials/6015-pc-folders-add-remove-windows-10-a.html


; Music
[HKEY_CLASSES_ROOT\CLSID\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\CLSID\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}]


; Downloads
[HKEY_CLASSES_ROOT\CLSID\{374DE290-123F-4565-9164-39C4925E467B}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\CLSID\{088e3905-0323-4b02-9826-5d99428e115f}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{374DE290-123F-4565-9164-39C4925E467B}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{088e3905-0323-4b02-9826-5d99428e115f}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}]


; Pictures
[HKEY_CLASSES_ROOT\CLSID\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\CLSID\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}]


; Videos
[HKEY_CLASSES_ROOT\CLSID\{A0953C92-50DC-43bf-BE83-3742FED03C9C}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\CLSID\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A0953C92-50DC-43bf-BE83-3742FED03C9C}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}]


; Documents
[HKEY_CLASSES_ROOT\CLSID\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\CLSID\{d3162b92-9365-467a-956b-92703aca08af}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{d3162b92-9365-467a-956b-92703aca08af}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}]


; Desktop
[HKEY_CLASSES_ROOT\CLSID\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]


; 3D objects
[HKEY_CLASSES_ROOT\CLSID\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]

删除资源管理器右键菜单垃圾

删除 "Share", "Scan with Windows defender" 等资源管理器 context menu 里的垃圾。

remove_rubbish_from_context_menu.reg

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\EPP]
[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EPP]
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Sharing]
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\ModernSharing]

注:必须先禁用 windows defender / security 相关服务,否则 scan with windows defender (EPP) 这个菜单项会被自动重新创建。

允许设置自动登录

Windows 7+ 可以用 netplwiz (或 control userpasswords2 ) 设置开机时自动以某用户登录。但新版 Windows 10 (2004+ ?) 默认去掉了这个选项。

找回方法:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device]
"DevicePasswordLessBuildVersion"=dword:00000000

Last update: 2021-10-14 09:04:56 UTC | Redirect from Windows/Windows 10