Case $Button37
GUICtrlSetState($Button37,$GUI_DISABLE)
If GUICtrlRead($Button37)="添加显示隐藏" Then
FileInstall("SuperHidden.vbs",@WindowsDir&"\SuperHidden.vbs")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\SuperHidden", "", "Reg_sz", "{00000000-0000-0000-0000-000000000022}")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\InProcServer32", "", "Reg_Expand_sz", "%SystemRoot%\system32\shdocvw.dll")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\InProcServer32", "ThreadingModel", "Reg_sz", "Apartment")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\Instance", "CLSID", "Reg_sz", "{3f454f0e-42ae-4d7c-8ea3-328250d6e272}")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\Instance\InitPropertyBag", "method", "Reg_sz", "ShellExecute")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\Instance\InitPropertyBag", "Param1", "Reg_sz", "SuperHidden.vbs")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\Instance\InitPropertyBag", "command", "Reg_sz", "显示/隐藏文件和后缀")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}\Instance\InitPropertyBag", "CLSID", "Reg_sz", "{13709620-C279-11CE-A49E-444553540000}")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSuperHidden", "Reg_Dword", "0x00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden", "Reg_Dword", "0x00000002")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","HideFileExt","Reg_Dword","0x00000001")
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")
GUICtrlSetData($Button37,"删除显示隐藏")
MsgBox(64,"提示","已添加显示/隐藏文件和后缀功能到右键,从右键执行")
ElseIf GUICtrlRead($Button37)="删除显示隐藏" Then
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000000-0000-0000-0000-000000000022}")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\SuperHidden")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSuperHidden", "Reg_Dword", "0x00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden", "Reg_Dword", "0x00000002")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","HideFileExt","Reg_Dword","0x00000001")
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")
If FileExists(@WindowsDir&"\SuperHidden.vbs") Then FileDelete(@WindowsDir&"\SuperHidden.vbs")
GUICtrlSetData($Button37,"添加显示隐藏")
MsgBox(64,"提示","显示/隐藏文件和后缀功能已从右键删除")
EndIf
GUICtrlSetState($Button37,$GUI_ENABLE)