Step 1 打开记事本,将下面的代码拷贝进去:
另存为SuperHidden.vbs文件(选择保存-格式选择所有文件,文件名输入SuperHidden.vbs),并拷贝到Windows目录下(也可以是任意目录)
Step2 另外新建一个文档文件,输入以下代码:
其中倒数第三行红色的部分是你安装Windows的位置,或者vbs脚本所在位置,倒数第二行蓝色的部分可以修改为你喜欢的文字
保存为.reg注册表文件,双击导入注册表.
Step 3 不需要重启和注销,直接可以看到效果:
- 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.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.SendKeys "{F5}+{F10}e"
- 'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
- end if
- Set WSHShell = Nothing
- WScript.Quit(0)
Step2 另外新建一个文档文件,输入以下代码:
- 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"="C:\\WINDOWS\\SuperHidden.vbs"
- "command"="Show/Hide Hidden Files"
- "CLSID"="{13709620-C279-11CE-A49E-444553540000}"
保存为.reg注册表文件,双击导入注册表.
Step 3 不需要重启和注销,直接可以看到效果:
step4 用AutoHotkey可以直接写进热键里,比如win + F5。
功能:在资源管理器、桌面、我的电脑、打开/保存窗口等,按win+F5即显示隐藏、系统文件及完整后缀。此功能执行后会自动关闭,无需手动关闭,但由于系统缓存,除非关闭窗口或按F5刷新,会保持显示隐藏文件。
也就是说,只要按一次win+F5就行了,别的不用再管。代码如下(需要安装Autohotkey)
- #F5::
- ID := WinActive("A")
- WinGetClass, Class, ahk_ID %ID%
- If (Class = "CabinetWClass") Or (Class = "Progman") Or (Class = "WorkerW") Or (Class = "#32770") Or (Class = "")
- Gosub ShowSuperHidden
- Return
- ShowSuperHidden:
- Tooltip 显示隐藏/系统文件
- SetTimer RemoveTooltip, 2000
- RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 00000001
- RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 00000001
- RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 00000000
- Send {F5}
- Sleep 500
- RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 00000002
- RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 00000000
- RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 00000001
- Return
- RemoveToolTip:
- ToolTip
- Return
转载于:https://blog.51cto.com/sincerecorner/675477