-
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <GUIConstants.au3>
- Opt("TrayMenuMode",1);
- FileInstall("LOGO.jpg", @TempDir & "")
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("注册表加解锁", 186, 90, 192, 124)
- $Pic1 = GUICtrlCreatePic(@TempDir & "\LOGO.jpg", 0, 0, 185, 49, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
- FileDelete(@TempDir & "\LOGO.jpg")
- $Button1 = GUICtrlCreateButton("加 锁", 11, 57, 75, 25)
- $Button2 = GUICtrlCreateButton("解 锁", 99, 57, 75, 25)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Select
- Case $nMsg = $GUI_EVENT_CLOSE
- Exit
- Case $nmsg = $Button1
- RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableRegistryTools", "REG_DWORD", "00000001")
- MsgBox(4096,"提示","注册表锁定成功!")
- Case $nmsg = $Button2
- RegDelete ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableRegistryTools")
- MsgBox(4096,"提示","注册表解锁成功!")
- endselect
- WEnd
复制代码 |