如何修改 Windows10 操作系统里某种文件类型的默认图标
2021-12-30 本文已影响0人
华山令狐冲
Windows10 用久了,想必大家对系统内默认的文件类型对应的图标感到审美疲劳了。比如下图的文本文件的默认图标:

本文介绍如何通过修改注册表的方式来更改这些默认的图标显示。
以管理员的身份运行注册表应用 regedit,路径:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts:

找到 .txt 文件的 userChoice key 为 txtfile:

然后到路径 HKEY_CLASSES_ROOT\txtfile\DefaultIcon 下,找到 txt 文件的默认图标位置:txtfile 的子文件夹:DefaultIcon
这里使用了 system32文件夹下的 imagesres.dll 文件内第 102 个图标:

路径:%SystemRoot%\system32\imageres.dll,-102
将其值更改为本地 ico 文件的绝对路径即可:

注销之后重新登录系统,就能看到自定义的图标了:

采用同样的办法,我也把 png 文件的默认图标替换了:

更多Jerry的原创文章,尽在:"汪子熙":
