::-------------------------------------------------------------------
:: XP Win7 Win8 测试可用,2003和2008,2012未测试
:: 区别仅在 Windows 目录下的 SuperHidden.vbs  文件
::WSHShell.SendKeys "{F5}"                
::WSHShell.SendKeys "{F5}+{F10}e  
::-------------------------------------------------------------------

::@echo off&color a
@echo off&color 2f

@title SuperHidden 
mode con: cols=68 lines=24

::显示界面
:start
cls
echo.
echo.           
echo                         SuperHidden 
echo.       
echo                  右键添加[显示/隐藏系统文件+扩展名]   
echo.  
echo.
echo    *************************************************************
echo.
echo                  ① 安装 SuperHidden
echo.
echo                  ② 卸载 SuperHidden
echo.
echo                  ③ 退出该程序
echo.
echo    *************************************************************
echo.

::选择菜单
set /p choice=★ 请输入 1-3 数字选择你要进行的操作：
cls
echo.
if "%choice%"=="" goto start
set choice=%choice:~0,1%
if /i "%choice%"=="1" goto Install
if /i "%choice%"=="2" goto UnInstall
if /i "%choice%"=="3" goto end
exit
:Install
del /f /q "%temp%\_.reg" >nul 2>nul
>>"%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 "command"="显示/隐藏系统文件+扩展名"
>>"%temp%\_.reg" echo "CLSID"="{13709620-C279-11CE-A49E-444553540000}"
>>"%temp%\_.reg" echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
>>"%temp%\_.reg" echo "ShowSuperHidden"=dword:00000001
>>"%temp%\_.reg" echo "Hidden"=dword:00000002
regedit /s "%temp%\_.reg" >nul 2>nul
del /f /q "%temp%\_.reg" >nul 2>nul

net config workstation |(find /i "windows 8")&&(goto win8)
net config workstation |(find /i "windows 7")&&(goto win8)
net config workstation |(find /i "windows 2008")&&(goto win8)
net config workstation |(find /i "windows 2012")&&(goto win8)
::WinXP 2K3 
del /f /q "%windir%\SuperHidden.vbs" >nul 2>nul
>>"%windir%\SuperHidden.vbs" echo  'Show/Hide System Files 
>>"%windir%\SuperHidden.vbs" echo  Dim WSHShell
>>"%windir%\SuperHidden.vbs" echo  Set WSHShell = WScript.CreateObject("WScript.Shell")
>>"%windir%\SuperHidden.vbs" echo  sTitle1 = "SSH=0"
>>"%windir%\SuperHidden.vbs" echo  sTitle2 = "SSH=1"
>>"%windir%\SuperHidden.vbs" echo  if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then
>>"%windir%\SuperHidden.vbs" echo  WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
>>"%windir%\SuperHidden.vbs" echo  WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
>>"%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", "显示系统文件+扩展名", "REG_SZ"
>>"%windir%\SuperHidden.vbs" echo  WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden.vbs" echo  'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation
>>"%windir%\SuperHidden.vbs" echo  else 
>>"%windir%\SuperHidden.vbs" echo  WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
>>"%windir%\SuperHidden.vbs" echo  WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
>>"%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", "隐藏系统文件+扩展名", "REG_SZ"
>>"%windir%\SuperHidden.vbs" echo  WSHShell.SendKeys "{F5}+{F10}e"
>>"%windir%\SuperHidden.vbs" echo  'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
>>"%windir%\SuperHidden.vbs" echo  end if 
>>"%windir%\SuperHidden.vbs" echo  Set WSHShell = Nothing
>>"%windir%\SuperHidden.vbs" echo  WScript.Quit(0)

cls
echo.
echo.           
echo                           安装完成!
echo.  
echo                          按任意键退出         
echo.  
echo.
pause>nul
exit
::Win8&Win7&2008
:win8
del /f /q "%windir%\SuperHidden.vbs" >nul 2>nul
>>"%windir%\SuperHidden.vbs" echo 'Show/Hide System Files 
>>"%windir%\SuperHidden.vbs" echo Dim WSHShell
>>"%windir%\SuperHidden.vbs" echo Set WSHShell = WScript.CreateObject("WScript.Shell")
>>"%windir%\SuperHidden.vbs" echo sTitle1 = "SSH=0"
>>"%windir%\SuperHidden.vbs" echo sTitle2 = "SSH=1"
>>"%windir%\SuperHidden.vbs" echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
>>"%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", "显示系统文件+扩展名", "REG_SZ"
>>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}"
>>"%windir%\SuperHidden.vbs" echo 'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation
>>"%windir%\SuperHidden.vbs" echo else
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
>>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
>>"%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", "隐藏系统文件+扩展名", "REG_SZ"
>>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}"
>>"%windir%\SuperHidden.vbs" echo 'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
>>"%windir%\SuperHidden.vbs" echo end if
>>"%windir%\SuperHidden.vbs" echo Set WSHShell = Nothing
>>"%windir%\SuperHidden.vbs" echo WScript.Quit(0)
cls
echo.
echo.           
echo                           安装完成!
echo.  
echo                          按任意键退出         
echo.  
echo.
pause>nul
exit
::卸载
:UnInstall
@echo off
reg delete "HKCR\Directory\Background\shellex\ContextMenuHandlers\SuperHidden" /f >nul 2>nul
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f >nul 2>nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden"  /t REG_DWORD /d 00000000 /f >nul 2>nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 00000002 /f >nul 2>nul
del /f /q "%windir%\SuperHidden.vbs" >nul 2>nul
cls
echo.
echo.           
echo                           卸载完成!
echo.  
echo                          按任意键退出         
echo.  
echo.
pause>nul
exit
::结束
:end
exit






