[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[注册表类] 批处理修改注册表显隐文件+扩展名

  1. ::WIN11一键切换经典或新式右键
  2. 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)
复制代码
  1. ::显隐文件+扩展名(另存为ANSI编码bat脚本运行 否则乱码 再次运行即可删除)
  2. @Echo off&%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
  3. if exist %Windir%\SuperHidden.vbs del /f/q %Windir%\SuperHidden.vbs>nul&reg delete "HKCR\Directory\Background\shell\InitPropertyBag" /f>nul&echo 卸除完毕!&ping 0 -n "2">nul&exit
  4. (echo Set WSHShell = WScript.CreateObject^("WScript.Shell"^)
  5. echo if WSHShell.RegRead^("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"^) = 1 then
  6. echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
  7. echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
  8. echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "1", "REG_DWORD"
  9. echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\MUIVerb", "显示文件+扩展名", "REG_SZ"
  10. echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\Icon", "imageres.dll,9", "REG_SZ"
  11. echo else
  12. echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
  13. echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
  14. echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD"
  15. echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\MUIVerb", "隐藏文件+扩展名", "REG_SZ"
  16. echo WSHShell.RegWrite "HKCR\Directory\Background\shell\InitPropertyBag\Icon", "imageres.dll,8", "REG_SZ"
  17. echo end if
  18. echo WSHShell.SendKeys "{F5}")>%Windir%\SuperHidden.vbs
  19. 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=隐藏
  20. (reg add "HKCR\Directory\Background\shell\InitPropertyBag" /v "MUIVerb" /t REG_SZ /d "%y%文件+扩展名" /f&reg add "HKCR\Directory\Background\shell\InitPropertyBag" /f /v "Icon" /t REG_SZ /d "imageres.dll,%x%"&reg 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
复制代码
1

评分人数

再写一个 WIN 11 的 ,谢谢,最后 在第一层右击菜单

TOP

感谢smss分享!
对新版win10右键中文支持不好,出现乱码,怎么修正?

TOP

既然WIN10就少用BAT了,眼晕。

TOP

vbs权限不够,修改注册表权限试试。

TOP

感谢分享。
我是 Total Commander 用户,把 cm_SwitchHidSys 放到菜单栏,显示/隐藏系统文件一键切换。
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表