- #NoTrayIcon
- #RequireAdmin
- #Region ;**** 参数创建于 ACNWrapper_GUI ****
- #AutoIt3Wrapper_Icon=工具.ico
- #AutoIt3Wrapper_OutFile=去掉QQ迷你首页广告.exe
- #AutoIt3Wrapper_Res_Comment=制作:yinbinly
- #AutoIt3Wrapper_Res_Description=去QQ广告
- #AutoIt3Wrapper_Res_LegalCopyright=版权所有 (C) 2011
- #AutoIt3Wrapper_Run_Tidy=y
- #EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
- #Region AutoIt3Wrapper 预编译参数(常用参数)
- #EndRegion AutoIt3Wrapper 预编译参数(常用参数)
- ;不显示托盘图标
- ;防止程序重复运行
- $g_szVersion = "test"
- If WinExists($g_szVersion) Then Exit
- AutoItWinSetTitle($g_szVersion)
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("yinbinly", 199, 182, 192, 124)
- $Button1 = GUICtrlCreateButton("去掉迷你首页", 24, 32, 145, 41)
- $Button2 = GUICtrlCreateButton("恢复迷你首页", 25, 98, 145, 41)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- $QQkey = "HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQ2009"
- $QQpath = RegRead($QQkey, "Install")
- $Dirs = $QQpath & "\Plugin\Com.Tencent.Advertisement\bin\Advertisement.dll"
- If FileSetAttrib($Dirs, "+R") Then
- MsgBox(0, "成功", "成功去除迷你首页")
- Else
- MsgBox(16, "失败", "仅对QQ2011有效?")
- EndIf
- Case $Button2
- $QQkey = "HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQ2009"
- $QQpath = RegRead($QQkey, "Install")
- $Dirs = $QQpath & "\Plugin\Com.Tencent.Advertisement\bin\Advertisement.dll"
- If FileSetAttrib($Dirs, "-R") Then
- MsgBox(0, "成功", "成功恢复迷你首页")
- Else
- MsgBox(16, "失败", "仅对QQ2011有效?")
- EndIf
- EndSwitch
- WEnd
复制代码
|