Windows7教程:。有朋友在求助區問如何添加“顯示隱藏文件和系統文件”到右鍵菜單,恰好搜到了方法,拿出來共享一下,希望對有需要的朋友有幫助。方法很簡單,
第一步: 打開記事本,將下面的紅色代碼拷貝進去:
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)
復制代碼另存為SuperHidden.vbs文件(選擇保存-格式選擇所有文件,文件名輸入SuperHidden.vbs),並拷貝到Windows目錄下(也可以是任意目錄)
第二步; 另外新建一個文檔文件,輸入以下紅色代碼:
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}"
復制代碼其中倒數第三行紅色的部分是你安裝Windows的位置,或者vbs腳本所在位置,倒數第二行藍色的部分可以修改為你喜歡的文字
保存為--右鍵顯示隱藏文件夾.reg--注冊表文件,雙擊導入注冊表即可.
還有一個更簡單方便的方法,是本人收集網上的方法優化整合而成的,方便大家的添加和卸載,歡迎使用。
新建文本文檔,復制入下面紅色代碼:
@echo off
mode con cols=41 lines=4
title 右鍵菜單 顯示/隱藏擴展名及文件
color 0b
if not exist "%windir%\SuperHidden.vbs" goto setup
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f >nul 2>nul
del /f /q "%windir%\SuperHidden.vbs" >nul 2>nul
echo.&echo 卸除完畢。
pause>nul
exit
:setup
color 0a
>"%windir%\SuperHidden.vbs" echo Dim WSHShell
>>"%windir%\SuperHidden.vbs" echo Set WSHShell = WScript.CreateObject("WScript.Shell")
>>"%windir%\SuperHidden.vbs" echo sTitle1 = "SSH=0"
>>"%windir%\SuperHidden.vbs" echo sTitle2 = "SSH=1"
>>"%windir%\SuperHidden.vbs" echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWord"
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWord"
>>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden.vbs" echo 'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation
>>"%windir%\SuperHidden.vbs" echo else
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWord"
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWord"
>>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden.vbs" echo 'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
>>"%windir%\SuperHidden.vbs" echo end if
>>"%windir%\SuperHidden.vbs" echo Set WSHShell = Nothing
>>"%windir%\SuperHidden.vbs" echo WScript.Quit(0)
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "%temp%\__.reg" >nul
del "%temp%\__.reg"
>"%temp%\_.reg" echo REGEDIT4
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]
>>"%temp%\_.reg" echo @="{00000000-0000-0000-0000-000000000012}"
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]
>>"%temp%\_.reg" echo @=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,\
>>"%temp%\_.reg" echo 68,64,6f,63,76,77,2e,64,6c,6c,00
>>"%temp%\_.reg" echo "ThreadingModel"="Apartment"
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]
>>"%temp%\_.reg" echo "CLSID"="{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]
>>"%temp%\_.reg" echo "method"="ShellExecute"
>>"%temp%\_.reg" echo "Param1"="SuperHidden.vbs"
>>"%temp%\_.reg" echo "CLSID"="{13709620-C279-11CE-A49E-444553540000}"
>>"%temp%\_.reg" echo "command"="顯示/隱藏文件夾"
regedit /s "%temp%\_.reg"
del /f /q "%temp%\_.reg"
echo.&echo 已添加右鍵顯示/隱藏文件夾 。
pause>nul
exit
另存為---右鍵添加顯示隱藏文件名.bat,運行bat即可添加卸載右鍵添加顯示隱藏文件夾項,非常實用方便。