|

楼主 |
yinbinly
发表于 2011-08-09 17:00:09
本帖最后由 yinbinly 于 2011/10/18 11:47 编辑
回复 6# 阿木
立即生效的代码 [code]#NoTrayIcon
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
FileInstall("Binly.ico", @WindowsDir & "\")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("ly", 193, 86, -1, -1)
$Radio1 = GUICtrlCreateRadio("去除小箭头", 8, 16, 81, 25, BitOR($GUI_SS_DEFAULT_RADIO,$BS_RIGHTBUTTON))
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio2 = GUICtrlCreateRadio("恢复小箭头", 9, 44, 81, 25, BitOR($GUI_SS_DEFAULT_RADIO,$BS_RIGHTBUTTON))
$Button1 = GUICtrlCreateButton("执行", 104, 16, 73, 57, $BS_DEFPUSHBUTTON)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Sleep(33)
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Radio1) = 1 Then
qc()
EndIf
If GUICtrlRead($Radio2) = 1 Then
hf()
EndIf
ProcessClose("explorer.exe")
Sleep(1000)
Run(@SystemDir & "\explorer.exe", "", @SW_HIDE)
Do
Until ProcessExists("explorer.exe")
MsgBox(0, "提示!", "优化完成!")
EndSwitch
WEnd
Func qc()
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons', '29', 'REG_SZ', 'C:\Windows\Binly.ico,0')
EndFunc;
Func hf()
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons')
EndFunc; [code] |
|