让Win7右键显示隐藏文件的方法

时间:23-08-18 16:03:49

作者:

分类:win7常见问题

  有一些朋友希望把显示隐藏文件的功能添加到右键菜单上,既然大家想要学习,那么电脑系统之家小编就来教大家,操作相对来说有点麻烦。接下来就是Win7右键显示隐藏文件选项的设置方法。

    让Win7右键显示隐藏文件的方法插图

  方法步骤

  1、新建一个文档,输入如下代码,并另存为:SuperHidden.reg

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]

@="{00000000-0000-0000-0000-000000000012}"

[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32] @=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,73,\ 68,64,6f,63,76,77,2e,64,6c,6c,00

"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]

"CLSID"="{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"

[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]

"method"="ShellExecute"

"Param1"="SuperHidden.vbs"

"command"="显示/隐藏系统文件+扩展名"

"CLSID"="{13709620-C279-11CE-A49E-444553540000}"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

"ShowSuperHidden"=dword:00000000

"Hidden"=dword:00000002

  2、在新建一个文档,输入代码后,另存为:SuperHidden.vbs

'Show/Hide System Files

Dim WSHShell

Set WSHShell = WScript.CreateObject("WScript.Shell")

sTitle1 = "SSH=0"

sTitle2 = "SSH=1"

if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then

WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "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.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "显示系统文件+扩展名", "REG_SZ"

WSHShell.SendKeys "{F5}+{F10}e"

'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation

else

WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "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.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "隐藏系统文件+扩展名", "REG_SZ"

WSHShell.SendKeys "{F5}+{F10}e"

'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation

end if

Set WSHShell = Nothing

WScript.Quit(0)

  3、将SuperHidden.vbs拷贝到C盘windows目录下即可,然后双击SuperHidden.reg(放到任意位置即可),修改注册表,就可以了(如果安装的杀毒软件弹出阻止对话框时,请勾上总是允许,并将下方的以后总是允许的勾勾上就可以了);

  4、这里是同时“显示系统文件+扩展名”,但我们平时使用最多的应该是“显示/隐藏扩展名”,所以,将上面的代码去掉几行就可以了。如本人使用的,就只保留了“显示/隐藏扩展名”的功能;

    让Win7右键显示隐藏文件的方法插图

  5、去掉的方法

  在SuperHidden.reg中去掉:

"Hidden"=dword:00000002

  在SuperHidden.reg中去掉:

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"

  6、这样就可以了。

  以上就是小编教给大家的让Win7右键显示隐藏文件的方法,按照以上方法进行操作,就能轻松将显示隐藏文件添加到右键菜单里去了。

  如果你觉得麻烦,可以下载软件轻松解决。

最新推荐