无聊写的小工具,感谢论坛fuldho对小弟的技术指点没技术含量仅供初学者交流
源码+附件+成品
源码- #NoTrayIcon
- #RequireAdmin
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- FileInstall("Binly.ico", @WindowsDir & "")
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("Form1", 193, 86, 623, 370)
- $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
- Sleep(1000)
- 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;
复制代码 附件+成品
|