Right-click to display (hide) The bat code with the extension

Source: Internet
Author: User

To "display/hide system files", you must right-click any folder or file to display the menu.
To display the "show/hide extension" menu, right-click a blank area in any folder.

Right-click to display (hide) the extension and system file. batCopy codeThe Code is 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", "display 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", "display 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", "display 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, 65, 6d, 52, 6f, 6f, 25, 5c, 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 Restore to original. batCopy codeThe Code is 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.