Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
intAnswer = MsgBox("【是】将“显示/隐藏系统文件”加入到右键菜单,"&Chr(10)&Chr(10)&"【否】将“显示/隐藏系统文件”从右键菜单删除。 ", vbQuestion + vbYesNoCancel, "显示/隐藏系统文件 -
zh159@bbs.cn-dos.net")
If intAnswer = vbYes Then
WshShell.RegWrite "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden\", "{00000000-0000-0000-0000-000000000012}", "REG_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32\", "%SystemRoot%\system32\shdocvw.dll", "REG_EXPAND_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32\ThreadingModel", "Apartment", "REG_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\CLSID", "{3f454f0e-42ae-4d7c-8ea3-328250d6e272}", "REG_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\CLSID", "{13709620-C279-11CE-A49E-444553540000}", "REG_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command", "显示系统文件", "REG_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\method", "ShellExecute", "REG_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\Param1", "SuperHidden.vbs", "REG_SZ"
WshShell.Run "cmd /c copy/y SuperHidden.vbs %windir%\",vbhide
end if
If intAnswer = vbNo Then
WshShell.Run "cmd /c reg delete HKCR\CLSID\{00000000-0000-0000-0000-000000000012} /f",vbhide
WshShell.Run "cmd /c reg delete HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden /f",vbhide
WshShell.Run "cmd /c del/q %windir%\SuperHidden.vbs",vbhide
end if
If intAnswer = vbCancel Then
end if
Set WSHShell = Nothing
WScript.Quit(0)