AM电脑吧 - Win10精简版系统_Win11精简版_Win7旗舰版

Yes
查看: 7799|回复: 4
收起左侧

[win7] win7 右键菜单添加“显示/隐藏文件及扩展名”

[复制链接]
ampc81

签到天数: 644 天

[LV.9]九级电脑高手

id
       1.新建一个 名为SuperHidden.vbs的文件放在windows目录下,该文件内容如下:

================================================================

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden") = 1 then
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SuperHidden", "0", "REG_DWORD"
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "1", "REG_DWORD"
WSHShell.SendKeys "{F5}+{F10}e"
else
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SuperHidden", "1", "REG_DWORD"
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD"
WSHShell.SendKeys "{F5}+{F10}e"
end if
Set WSHShell = Nothing
WScript.Quit(0)

=================================================================



       2. 新建一个注册表文件,这里我命名为showfile.reg,该注册表文件内容如下(注意:这里默认为C盘,如果win7装在其他分区要作相应的改动):

=================================================================

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\DisplayFileExt]
@="显示/隐藏 文件扩展名"

[HKEY_CLASSES_ROOT\*\shell\DisplayFileExt\Command]
@="WScript.exe C:\\Windows\\SuperHidden.vbs"

[HKEY_CLASSES_ROOT\Directory\Background\shell\DisplayFileExt]
@="显示/隐藏 文件扩展名"

[HKEY_CLASSES_ROOT\Directory\Background\shell\DisplayFileExt\Command]
@="WScript.exe C:\\Windows\\SuperHidden.vbs"

[HKEY_CLASSES_ROOT\Folder\shell\DisplayFileExt]
@="显示/隐藏 文件扩展名"

[HKEY_CLASSES_ROOT\Folder\shell\DisplayFileExt\Command]
@="WScript.exe C:\\Windows\\SuperHidden.vbs"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\DisplayFileExt]
@="显示/隐藏 文件扩展名"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\DisplayFileExt\Command]
@="WScript.exe C:\\Windows\\SuperHidden.vbs"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\DisplayFileExt]
@="显示/隐藏 文件扩展名"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\DisplayFileExt\Command]
@="WScript.exe C:\\Windows\\SuperHidden.vbs"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DisplayFileExt]
@="显示/隐藏 文件扩展名"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DisplayFileExt\Command]
@="WScript.exe C:\\Windows\\SuperHidden.vbs"

=============================================================

建好后双击导入注册表,然后在桌面上刷新一下打开右键,就发现已经有该右键菜单了,下面再说下卸载方法吧,不能这么流氓对吧

卸载批处理文件(也就是把下面分割线内内容拷贝保存为unshowfile.bat双击运行即可)如下:

==============================================================

del  /q  /f  %windir%SuperHidden.vbs

reg delete "HKEY_CLASSES_ROOT\*\shell\DisplayFileExt" /F

reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\DisplayFileExt" /F

reg delete "HKEY_CLASSES_ROOT\Folder\shell\DisplayFileExt" /F

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\DisplayFileExt" /F

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\DisplayFileExt" /F

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DisplayFileExt" /F

========================================================

本文地址: https://www.ampc8.com/thread-4662-1-1.html
上一篇:并非危言耸听 手机将被超声波绑架
下一篇:安装ADOBE CS4软件出现的错误,朋友是说是系统的原因?
回复

举报

ampc810336

签到天数: 3817 天

[LV.Master]顶级配置

id leo
Win7右键增加“管理员权限”又怎么弄呢?
回复

举报

ampc813168

签到: Lazy

id 275616072
谢谢老大,这次可以用了呵呵
回复

举报

ampc812737

签到: Lazy

id 孤独剑魔悦
{:4_341:}谢谢
回复

举报

ampc836

签到天数: 2640 天

[LV.Master]顶级配置

id δ豆σ豆δ
看起来好长呀,记不住,慢慢来,谢谢!
回复

举报

您需要登录后才可以回帖 登录 | 验证注册

Powered by AMpc8.Com (晋ICP备13003365号ghs 晋公网安备 14090202000112号 |GMT+8, 2024/5/20 03:07 |
快速回复 返回顶部 返回列表