Step 1 打开记事本,将下面的代码拷贝进去:
  1. Dim WSHShell
  2. Set WSHShell = WScript.CreateObject("WScript.Shell")
  3. sTitle1 = "SSH=0"
  4. sTitle2 = "SSH=1"
     
  5.  
  6. if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then
  7.  
  8. WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
  9. WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
  10. WSHShell.SendKeys "{F5}+{F10}e"
  11. 'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation
  12.  
  13. else
  14.  
  15. WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
  16. WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
  17. WSHShell.SendKeys "{F5}+{F10}e"
  18. 'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
  19.  
  20. end if
  21.  
  22. Set WSHShell = Nothing
  23. WScript.Quit(0)

另存为SuperHidden.vbs文件(选择保存-格式选择所有文件,文件名输入SuperHidden.vbs),并拷贝到Windows目录下(也可以是任意目录)

Step2 另外新建一个文档文件,输入以下代码:
  1. REGEDIT4
  2.  
  3. [HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]
  4. @="{00000000-0000-0000-0000-000000000012}"
  5.  
  6. [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]
  7. @=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,\
  8. 68,64,6f,63,76,77,2e,64,6c,6c,00
  9. "ThreadingModel"="Apartment"
  10.  
  11. [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]
  12. "CLSID"="{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
  13.  
  14. [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]
  15. "method"="ShellExecute"
  16. "Param1"="C:\\WINDOWS\\SuperHidden.vbs"
  17. "command"="Show/Hide Hidden Files"
  18. "CLSID"="{13709620-C279-11CE-A49E-444553540000}"

其中倒数第三行红色的部分是你安装Windows的位置,或者vbs脚本所在位置,倒数第二行蓝色的部分可以修改为你喜欢的文字
保存为.reg注册表文件,双击导入注册表.

Step 3 不需要重启和注销,直接可以看到效果:



step4 用AutoHotkey可以直接写进热键里,比如win + F5。
功能:在资源管理器、桌面、我的电脑、打开/保存窗口等,按win+F5即显示隐藏、系统文件及完整后缀。此功能执行后会自动关闭,无需手动关闭,但由于系统缓存,除非关闭窗口或按F5刷新,会保持显示隐藏文件。

也就是说,只要按一次win+F5就行了,别的不用再管。代码如下(需要安装Autohotkey)

 

  1. #F5::
  2. ID := WinActive("A")
  3. WinGetClass, Class, ahk_ID %ID%
  4. If (Class = "CabinetWClass") Or (Class = "Progman") Or (Class = "WorkerW") Or (Class = "#32770") Or (Class = "")
  5. Gosub ShowSuperHidden
  6. Return
  7. ShowSuperHidden:
  8. Tooltip 显示隐藏/系统文件
  9. SetTimer RemoveTooltip, 2000
  10. RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 00000001
  11. RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 00000001
  12. RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 00000000
  13. Send {F5}
  14. Sleep 500
  15. RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 00000002
  16. RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 00000000
  17. RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 00000001
  18. Return
  19. RemoveToolTip:
  20. ToolTip
  21. Return