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

Win7 右鍵選單新增「顯示/隱藏系統檔案」切換腳本

編輯:Win7 系統應用技巧

頻繁切換隱藏檔案顯示狀態?將 VBScript 加入右鍵選單,一鍵切換「顯示隱藏檔案、資料夾及磁碟機」與「隱藏受保護的作業系統檔案」。

製作步驟

  1. 開啟記事本,貼上以下程式碼,另存為 SuperHidden.vbs(編碼選 ANSI),放置於 C:\Windows 或任意固定路徑。
    Dim WSHShell
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    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"
    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"
    End If
    WSHShell.SendKeys "{F5}+{F10}e"
    Set WSHShell = Nothing
  2. 新增登錄檔 AddToContextMenu.reg,內容如下:
    REGEDIT4
    [HKEY_CLASSES_ROOT\Directory\Background\shell\ex\ContextMenuHandlers\SuperHidden]
    @="{00000000-0000-0000-0000-000000000012}"
    [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]
    @="wscript.exe"
    "ThreadingModel"="Apartment"
  3. 雙擊匯入登錄檔,完成後在資料夾空白處右鍵即可看到「SuperHidden」選項,點擊即切換顯示狀態。

此技巧同樣適用於 Windows 8/10,方便快速檢視隱藏系統檔案。

Copyright © Windows教程網 All Rights Reserved