Right-click to display (hide) The name of the BAT code for the extension _dos/bat

Source: Internet
Author: User
Tags ssh
Show/Hide system files you need to right-click any folder or file to display the menu
Show/Hide extensions to display menus by right-clicking an empty space in any folder

Right-click to display (hide) extension and system files. bat
Copy Code code as follows:

@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 "," Show Extension "," 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 "," Hide Extension "," 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 "," Show Extension "," 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 "," Show Extension "," 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= Hide extension
If%v% equ 1 set vv= display extension
> "%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 @= "Show/Hide system Files"
>> "%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 @= "Show/Hide system Files"
>> "%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

Right-click to restore the original. bat
Copy Code code as follows:

@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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.