Windows 彻底移除 .txt 文件右键菜单中“打开方式”里显示的其他应用程序
方法
方法一
打开注册表编辑器
按 Win + R
,输入 regedit
,回车。
清除“打开方式”历史和多余程序
2.1 用户最近使用过的程序记录(可清除)
这些记录存储在:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithList
和
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithProgids
方法二
# 删除 .txt 的 OpenWithList 和 OpenWithProgids
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithList" -Recurse -ErrorAction SilentlyContinue
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithProgids" -Recurse -ErrorAction SilentlyContinue
# 重启资源管理器
Stop-Process -Name explorer -Force
移除已卸载的残余
清理残留的 Applications 注册项(针对已卸载软件)
HKEY_CLASSES_ROOT\Applications
HKEY_CURRENT_USER\Software\Classes\Applications