#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
FileInstall("E:\programming\Reg2Au3\patch.exe",@TempDir&"")
$Form1 = GUICreate("patch", 200, 200, 400, 400)
$Label1 = GUICtrlCreateLabel("本程序要和BD权限设置工具配合使用。仅供测试使用,不得用于商业用途,请在测试后及时删除,作者不承担任何法律责任。", 26, 50, 155, 89)
$Group1 = GUICtrlCreateGroup("说明", 15, 20, 165, 120)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("安装", 15, 159, 75, 35)
$Button2 = GUICtrlCreateButton("取消", 105, 159, 75, 35)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Run(@TempDir&"\patch.exe")
MsgBox(0,"成功","安装成功!")
Case $Button2
MsgBox(0,"提示","您取消了安装!")
FileDelete(@TempDir&"\patch.exe")
Exit
EndSwitch
WEnd
|