Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 7 將「顯示/隱藏隱藏檔案」加入右鍵選單:VBS + 登錄表一鍵切換

編輯:Windows 7 系統介紹

將切換隱藏檔案顯示狀態的功能加入桌面/資料夾右鍵選單,一鍵切換無需進入資料夾選項。

步驟 1:建立 VBS 腳本

記事本貼入以下程式碼,存為 SuperHidden.vbs 放入 C:\Windows(或任意路徑):

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"
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"
End If
Set WSHShell = Nothing
WScript.Quit(0)

步驟 2:匯入登錄表加入右鍵選單

新建文字檔貼入以下內容,存為 AddSuperHidden.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"="C:\\Windows\\SuperHidden.vbs"
"command"="顯示/隱藏 隱藏檔案"
"CLSID"="{13709620-C279-11CE-A49E-444553540000}"

注意:Param1 路徑需對應 VBS 實際位置;command 文字可自訂。

匯入後,桌面/資料夾空白處右鍵即見 顯示/隱藏 隱藏檔案,點選即切換並自動重新整理。

Copyright © Windows教程網 All Rights Reserved