中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

如何實現右鍵顯示擴展名的bat

發布時間:2021-09-30 11:30:31 來源:億速云 閱讀:171 作者:小新 欄目:開發技術

這篇文章主要介紹如何實現右鍵顯示擴展名的bat,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

“顯示/隱藏 系統文件”需右鍵單擊任意文件夾或文件才能顯示菜單
“顯示/隱藏 擴展名”需右鍵單擊任意文件夾里的空白處才能顯示菜單

右鍵顯示(隱藏)擴展名及系統文件.bat

代碼如下:


@echo off
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\*\shell\DisplayFileExt" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Folder\shell\DisplayFileExt" /f >nul 2>nul
del /f /q "%windir%\SuperHidden.vbs" "%windir%\SuperHidden1.vbs" >nul 2>nul
>"%windir%\SuperHidden.vbs" echo Dim WSHShell
>>"%windir%\SuperHidden.vbs" echo Set WSHShell = WScript.CreateObject("WScript.Shell")
>>"%windir%\SuperHidden.vbs" echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt") = 0 then
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "1", "REG_DWORD"
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "顯示擴展名", "REG_SZ"
>>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden.vbs" echo else
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD"
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "隱藏擴展名", "REG_SZ"
>>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden.vbs" echo end if
>>"%windir%\SuperHidden.vbs" echo Set WSHShell = Nothing
>>"%windir%\SuperHidden.vbs" echo WScript.Quit(0)
>"%windir%\SuperHidden1.vbs" echo Dim WSHShell
>>"%windir%\SuperHidden1.vbs" echo Set WSHShell = WScript.CreateObject("WScript.Shell")
>>"%windir%\SuperHidden1.vbs" echo sTitle1 = "SSH=0"
>>"%windir%\SuperHidden1.vbs" echo sTitle2 = "SSH=1"
>>"%windir%\SuperHidden1.vbs" echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then
>>"%windir%\SuperHidden1.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
>>"%windir%\SuperHidden1.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
>>"%windir%\SuperHidden1.vbs" echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "顯示擴展名", "REG_SZ"
>>"%windir%\SuperHidden1.vbs" echo WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden1.vbs" echo 'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation
>>"%windir%\SuperHidden1.vbs" echo else
>>"%windir%\SuperHidden1.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
>>"%windir%\SuperHidden1.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
>>"%windir%\SuperHidden1.vbs" echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "顯示擴展名", "REG_SZ"
>>"%windir%\SuperHidden1.vbs" echo WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden1.vbs" echo 'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
>>"%windir%\SuperHidden1.vbs" echo end if
>>"%windir%\SuperHidden1.vbs" echo Set WSHShell = Nothing
>>"%windir%\SuperHidden1.vbs" echo WScript.Quit(0)
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "%temp%\__.reg" >nul
for /f "tokens=2 delims==" %%. in ('find/i "HideFileExt" "%temp%\__.reg"') do set v=%%~.
del "%temp%\__.reg"
set v=%v:~-1%
if %v% equ 0 set vv=隱藏擴展名
if %v% equ 1 set vv=顯示擴展名
>"%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"="%vv%"
>>"%temp%\_.reg" echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\DisplayFileExt]
>>"%temp%\_.reg" echo @="顯示/隱藏 系統文件"
>>"%temp%\_.reg" echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\DisplayFileExt\Command]
>>"%temp%\_.reg" echo @="WScript.exe C:\\Windows\\SuperHidden1.vbs"
>>"%temp%\_.reg" echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DisplayFileExt]
>>"%temp%\_.reg" echo @="顯示/隱藏 系統文件"
>>"%temp%\_.reg" echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DisplayFileExt\Command]
>>"%temp%\_.reg" echo @="WScript.exe C:\\Windows\\SuperHidden1.vbs"
regedit /s "%temp%\_.reg"
del /f /q "%temp%\_.reg"
exit


右鍵恢復原樣.bat

代碼如下:


@echo off
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\*\shell\DisplayFileExt" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Folder\shell\DisplayFileExt" /f >nul 2>nul
del /f /q "%windir%\SuperHidden.vbs" "%windir%\SuperHidden1.vbs" >nul 2>nul

以上是“如何實現右鍵顯示擴展名的bat”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

bat
AI

九龙县| 湖南省| 通河县| 深圳市| 隆安县| 静安区| 洪洞县| 金塔县| 河池市| 杂多县| 大田县| 清徐县| 九龙县| 耿马| 惠安县| 广南县| 扶余县| 容城县| 穆棱市| 东源县| 普定县| 本溪| 永年县| 鄂托克旗| 睢宁县| 明水县| 黄浦区| 元氏县| 石泉县| 绥阳县| 九江市| 乌拉特前旗| 绿春县| 商城县| 忻州市| 永善县| 宜章县| 平罗县| 额济纳旗| 六枝特区| 肇东市|