- ::WIN11一键切换经典或新式右键
- reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f||(reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /d "" /f&taskkill /f /im explorer.exe&start explorer.exe)
复制代码
- ::显隐文件+扩展名(另存为ANSI编码bat脚本运行 否则乱码 再次运行即可删除)
- @Echo off&%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
- if exist %Windir%\SuperHidden.vbs del /f/q %Windir%\SuperHidden.vbs>nul® delete "HKCR\Directory\Background\shell\InitPropertyBag" /f>nul&echo 卸除完毕!&ping 0 -n "2">nul&exit
- (echo Set WSHShell = WScript.CreateObject^("WScript.Shell"^)
- echo if WSHShell.RegRead^("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"^) = 1 then
- echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
- echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
- echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "1", "REG_DWORD"
- echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\MUIVerb", "显示文件+扩展名", "REG_SZ"
- echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\Icon", "imageres.dll,9", "REG_SZ"
- echo else
- echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
- echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
- echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD"
- echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\MUIVerb", "隐藏文件+扩展名", "REG_SZ"
- echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\Icon", "imageres.dll,8", "REG_SZ"
- echo end if
- echo WSHShell.SendKeys "{F5}")>%Windir%\SuperHidden.vbs
- for /f "tokens=1,2,* " %%i in ('reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt')do if %%k==0x1 (set x=9&set y=显示)else set x=8&set y=隐藏
- (reg add "HKCR\Directory\Background\shell\InitPropertyBag" /v "MUIVerb" /t REG_SZ /d "%y%文件+扩展名" /f® add "HKCR\Directory\Background\shell\InitPropertyBag" /f /v "Icon" /t REG_SZ /d "imageres.dll,%x%"® add "HKCR\Directory\Background\shell\InitPropertyBag\Command" /t REG_SZ /d "%Windir%\System32\WScript.exe %windir%\SuperHidden.vbs" /f)>nul&echo 安装完毕!&ping 0 -n "2">nul&exit
复制代码
作者: Batcher 时间: 2018-12-22 10:19
感谢分享。
我是 Total Commander 用户,把 cm_SwitchHidSys 放到菜单栏,显示/隐藏系统文件一键切换。
作者: 窄口牛 时间: 2019-2-18 08:02
vbs权限不够,修改注册表权限试试。
作者: xczxczxcz 时间: 2019-4-11 17:29
既然WIN10就少用BAT了,眼晕。
作者: sofood 时间: 2019-12-1 23:04
感谢smss分享!
对新版win10右键中文支持不好,出现乱码,怎么修正?
作者: anythingsky 时间: 2022-1-28 13:04
再写一个 WIN 11 的 ,谢谢,最后 在第一层右击菜单
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |