无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 4312|回复: 8
打印 上一主题 下一主题

自己需要自己写,顺带给大家共享共享。Show&Hide System File

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-4 23:34:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
@echo off
color 5f
title Show\Hide System File
:选择
cls
echo.
echo  -----------------------------------------------------------------------------
echo.
echo   1 、 Windows 7 安装
echo.
echo   2 、 Windows 2K-XP-2K3 安装
echo.
echo.
echo   3 、 Windows 7 卸载
echo.
echo   4 、 Windows 2K-XP-2K3 卸载
echo.
echo  -----------------------------------------------------------------------------
echo.
set Choice=1
set /p Choice= 输入(直接回车选1):
if /i '%Choice%'=='1' goto w7
if /i '%Choice%'=='2' goto 2k-xp-2k3
if /i '%Choice%'=='3' goto w7-uninstall
if /i '%Choice%'=='4' goto 2k-xp-2k3-uninstall
cls
echo.
echo  '%Choice%' 是错误的选择。
echo.
echo  请输入 1~4 然后确定。
echo.
ping localhost -n 3 >nul
goto 选择

:w7
cls
title Windows 7 Install
echo 'Show/Hide System Files by [email=@yahoo.cn]@yahoo.cn>>"%tmp%\SuperHidden.vbs[/email]"
echo.>>"%tmp%\SuperHidden.vbs"
echo Dim WSHShell>>"%tmp%\SuperHidden.vbs"
echo Set WSHShell = WScript.CreateObject("WScript.Shell")>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden") = 2 then>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideDrivesWithNoMedia", "0", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑*【隐藏计算机文件夹中的空驱动器】不勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑*【隐藏受保护的操作系统文件(推荐)】不勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑-【显示隐藏的文件、文件夹或驱动器】选择>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "隐藏系统文件<<", "REG_SZ">>"%tmp%\SuperHidden.vbs"
echo '>>"%tmp%\SuperHidden.vbs"
echo WSHShell.SendKeys "{F5}">>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo else>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideDrivesWithNoMedia", "1", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑*【隐藏计算机文件夹中的空驱动器】勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑*【隐藏受保护的操作系统文件(推荐)】勾选 >>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑-【不显示隐藏的文件、文件夹或驱动器】选择>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "显示系统文件<<", "REG_SZ">>"%tmp%\SuperHidden.vbs"
echo '>>"%tmp%\SuperHidden.vbs"
echo WSHShell.SendKeys "{F5}">>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo end if>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo Set WSHShell = Nothing>>"%tmp%\SuperHidden.vbs"
echo WScript.Quit(0)>>"%tmp%\SuperHidden.vbs"
copy /y "%tmp%\SuperHidden.vbs" %SystemRoot% 1>nul 2>nul
reg add "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden" /f /ve /t REG_SZ /d "{00000000-0000-0000-0000-000000000012}"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32" /f /ve /t REG_EXPAND_SZ /d "%SystemRoot%\system32\shdocvw.dll"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32" /f /v "ThreadingModel" /t REG_SZ /d "Apartment"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance" /f /v "CLSID" /t REG_SZ /d "{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "method" /t REG_SZ /d "ShellExecute"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "Param1" /t REG_SZ /d "SuperHidden.vbs"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "command" /t REG_SZ /d "隐藏系统文件<<"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "CLSID" /t REG_SZ /d "{13709620-C279-11CE-A49E-444553540000}"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "Hidden" /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "HideFileExt" /t REG_DWORD /d 0
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "HideDrivesWithNoMedia" /t REG_DWORD /d 0
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "ShowSuperHidden" /t REG_DWORD /d 1
del /q "%tmp%\SuperHidden.vbs" 1>nul 2>nul
echo.
echo.
echo  安装成功,并且更改为显示系统文件。
echo.
pause
>%tmp%\Refresh.vbs echo WScript.CreateObject("WScript.Shell").SendKeys "{F5}"
start %tmp%\Refresh.vbs
exit

:2k-xp-2k3
cls
title Windows 2K-XP-2K3 Install
echo 'Show/Hide System Files by [email=@yahoo.cn]@yahoo.cn>>"%tmp%\SuperHidden.vbs[/email]"
echo.>>"%tmp%\SuperHidden.vbs"
echo Dim WSHShell>>"%tmp%\SuperHidden.vbs"
echo Set WSHShell = WScript.CreateObject("WScript.Shell")>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden") = 2 then>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\WebViewBarricade", "1", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑【显示系统文件夹的内容】  勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑【隐藏受保护的操作系统文件(推荐)】  不勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑【显示所有文件和文件夹】>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "隐藏系统文件<<", "REG_SZ">>"%tmp%\SuperHidden.vbs"
echo '↑【修改菜单显示名】>>"%tmp%\SuperHidden.vbs"
echo WSHShell.SendKeys "{F5}+{F10}e">>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo else>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\WebViewBarricade", "0", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑【显示系统文件夹的内容】  不勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑【隐藏受保护的操作系统文件(推荐)】  勾选>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD">>"%tmp%\SuperHidden.vbs"
echo '↑【不显示隐藏的文件和文件夹】>>"%tmp%\SuperHidden.vbs"
echo WSHShell.RegWrite "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "显示系统文件<<", "REG_SZ">>"%tmp%\SuperHidden.vbs"
echo '↑【修改菜单显示名】>>"%tmp%\SuperHidden.vbs"
echo WSHShell.SendKeys "{F5}+{F10}e">>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo end if>>"%tmp%\SuperHidden.vbs"
echo.>>"%tmp%\SuperHidden.vbs"
echo Set WSHShell = Nothing>>"%tmp%\SuperHidden.vbs"
echo WScript.Quit(0)>>"%tmp%\SuperHidden.vbs"
copy /y "%tmp%\SuperHidden.vbs" %SystemRoot% 1>nul 2>nul
reg add "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden" /f /ve /t REG_SZ /d "{00000000-0000-0000-0000-000000000012}"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32" /f /ve /t REG_EXPAND_SZ /d "%SystemRoot%\system32\shdocvw.dll"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32" /f /v "ThreadingModel" /t REG_SZ /d "Apartment"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance" /f /v "CLSID" /t REG_SZ /d "{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "method" /t REG_SZ /d "ShellExecute"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "Param1" /t REG_SZ /d "SuperHidden.vbs"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "command" /t REG_SZ /d "隐藏系统文件<<"
reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag" /f /v "CLSID" /t REG_SZ /d "{13709620-C279-11CE-A49E-444553540000}"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "Hidden" /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "WebViewBarricade" /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "ShowSuperHidden" /t REG_DWORD /d 1
del /q "%tmp%\SuperHidden.vbs" 1>nul 2>nul
echo.
echo.
echo  安装成功,并且更改为显示系统文件。
echo.
pause
>%tmp%\Refresh.vbs echo WScript.CreateObject("WScript.Shell").SendKeys "{F5}+{F10}e"
start %tmp%\Refresh.vbs
exit

:w7-uninstall
cls
title Windows 7 Uninstall
del /q %SystemRoot%\SuperHidden.vbs 1>nul 2>nul
reg delete "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden" /f
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "Hidden" /t REG_DWORD /d 2
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "HideDrivesWithNoMedia" /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "ShowSuperHidden" /t REG_DWORD /d 0
echo.
echo.
echo  卸载成功,并且更改为隐藏系统文件与扩展名。
echo.
pause
>%tmp%\Refresh.vbs echo WScript.CreateObject("WScript.Shell").SendKeys "{F5}"
start %tmp%\Refresh.vbs
exit
:2k-xp-2k3-uninstall
cls
title Windows 2K-XP-2K3 Uninstall
del /q %SystemRoot%\SuperHidden.vbs 1>nul 2>nul
reg delete "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden" /f
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "Hidden" /t REG_DWORD /d 2
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "WebViewBarricade" /t REG_DWORD /d 0
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "ShowSuperHidden" /t REG_DWORD /d 0
echo.
echo.
echo  卸载成功,并且更改为隐藏系统文件与扩展名。
echo.
pause
>%tmp%\Refresh.vbs echo WScript.CreateObject("WScript.Shell").SendKeys "{F5}+{F10}e"
start %tmp%\Refresh.vbs
exit






我在WINDOWS7下试了正常,谁XP下试试好不好用。

[ 本帖最后由 brave_boy 于 2011-7-25 13:31 编辑 ]
2#
发表于 2010-1-5 10:22:36 | 只看该作者
支持楼主了,总算做了沙发!
回复

使用道具 举报

3#
发表于 2010-1-5 15:11:51 | 只看该作者
随便写了一个需要PECMD支持的,另存为SuperHidden.wcs即可,右键菜单没写,我喜欢用热键调用执行。

//显示&隐藏文件及扩展名
ENVI Adv=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
REGI #%Adv%\ShowSuperHidden,RegDat
FIND $%RegDat%=0x00000000,call 显示!call 隐藏

_SUB 隐藏
REGI %Adv%\ShowSuperHidden=#0
REGI %Adv%\Hidden=#2
TEAM REGI %Adv%\HideFileExt=#1|SEND #116,#93,E \\#116=F5,#93=MEMU就是徽标与右Ctrl中间的那个健
_END

_SUB 显示
REGI HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue=#1
REGI %Adv%\ShowSuperHidden=#1
REGI %Adv%\Hidden=#1
TEAM REGI %Adv%\HideFileExt=#0|SEND #116,#93,E
_END

[ 本帖最后由 jxf268 于 2010-1-5 15:14 编辑 ]
回复

使用道具 举报

4#
发表于 2010-1-6 09:29:41 | 只看该作者
用vbs写了一个,XP/PE自己测试均可用。

Dim WshShell,SysDir,VbsPath
  set WshShell = WScript.CreateObject("WScript.shell")
  SysRootDir = WshShell.ExpandEnvironmentStrings("%windir%")&"\system32\"
  VbsPath=left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))
  StrShow = "显示系统文件+扩展名"
  StrHide = "隐藏系统文件+扩展名"
  StrReg = "{bd7ef628-3459-45d0-b81e-f11a4f58c2a3}"
  DirReg0 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
  DirReg1 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
  DirReg2 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt"
  DirReg3 = "HKLM\SOFTWARE\Classes\CLSID\"&StrReg
  DirReg4 = "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden"
if VbsPath = SysRootDir Then
    ShoworHide
  else
    Setupvbs
end if
Function ShoworHide( )
  if WSHShell.RegRead(DirReg1) = 1 Then
    WSHShell.RegWrite DirReg0, "0", "REG_DWORD"
    WSHShell.RegWrite DirReg1, "2", "REG_DWORD"
    WSHShell.RegWrite DirReg2, "1", "REG_DWORD"
    WshShell.RegWrite DirReg3&"\Instance\InitPropertyBag\command", StrShow, "REG_SZ"
    WshShell.SendKeys "{F5}+{F10}e"
  else
    WSHShell.RegWrite DirReg0, "1", "REG_DWORD"
    WSHShell.RegWrite DirReg1, "1", "REG_DWORD"
    WSHShell.RegWrite DirReg2, "0", "REG_DWORD"
    WshShell.RegWrite DirReg3&"\Instance\InitPropertyBag\command", StrHide, "REG_SZ"
    WshShell.SendKeys "{F5}+{F10}e"
  end if
  Set WSHShell = Nothing
  WScript.Quit(0)
End Function
Function Setupvbs( )
  if WSHShell.RegRead(DirReg1) = 2 Then
    StrShow1 = StrShow
    else StrShow1 = StrHide
  end if
  intAnswer = MsgBox("【是】将“显示/隐藏系统文件+扩展名”加入到右键菜单。 "&Chr(10)&Chr(10)&"【否】将“显示/隐藏系统文件+扩展名”从右键菜单删除。 "&Chr(10)&Chr(10)&"【取消】将直接“"&StrShow1&"”并退出。 ", vbQuestion + vbYesNoCancel, "显示/隐藏系统文件+扩展名")
  If intAnswer = vbYes Then
    WshShell.RegWrite  DirReg4&"\",StrReg,"REG_SZ"
    WshShell.RegWrite DirReg3&"\InProcServer32\",SysRootDir&"shdocvw.dll" ,"REG_EXPAND_SZ"
    WshShell.RegWrite DirReg3&"\InProcServer32\ThreadingModel","Apartment","REG_SZ"
    WshShell.RegWrite DirReg3&"\Instance\CLSID","{3f454f0e-42ae-4d7c-8ea3-328250d6e272}","REG_SZ"
    WshShell.RegWrite DirReg3&"\Instance\InitPropertyBag\CLSID","{13709620-C279-11CE-A49E-444553540000}","REG_SZ"
    WshShell.RegWrite DirReg3&"\Instance\InitPropertyBag\command",StrShow1,"REG_SZ"
    WshShell.RegWrite DirReg3&"\Instance\InitPropertyBag\method","ShellExecute","REG_SZ"
    WshShell.RegWrite DirReg3&"\Instance\InitPropertyBag\Param1",SysRootDir&"ShoworHide.vbs","REG_SZ"
    set copy1=createobject("scripting.filesystemobject")
    copy1.getfile(wscript.scriptfullname).copy SysRootDir&"ShoworHide.vbs",true
  end if
  If intAnswer = vbNo Then
    WshShell.Run "cmd /c reg delete "&DirReg3&" /f",vbhide
    WshShell.Run "cmd /c reg delete "&DirReg4&" /f",vbhide
    WshShell.Run "cmd /c reg delete "&DirReg0&" /v ShowSuperHidden /f",vbhide
    WshShell.Run "cmd /c DEL /F /AS /Q "&SysRootDir&"ShoworHide.vbs",vbhide
  end if
  If intAnswer = vbCancel Then
    ShoworHide
  end if
  Set WSHShell = Nothing
  WScript.Quit(0)
End Function
回复

使用道具 举报

5#
发表于 2010-1-8 11:42:16 | 只看该作者
一头雾水,以上代码干嘛用的?
回复

使用道具 举报

6#
发表于 2010-1-8 22:36:17 | 只看该作者
4楼的很好用啊。。谢谢
回复

使用道具 举报

7#
 楼主| 发表于 2010-1-9 17:17:15 | 只看该作者
WIN7适用否?俺用win7的
回复

使用道具 举报

8#
发表于 2010-1-10 14:57:49 | 只看该作者
顶楼的xp没效果.

4楼的不错.3楼的快捷键是什么?
回复

使用道具 举报

9#
发表于 2010-1-11 13:52:04 | 只看该作者
不错,看看,建议楼主来些说明,不然,都不知是什么。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-1-11 11:49

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表