#include #include #include #include #include Func Backup() FileCopy("C:", "D:", $FC_OVERWRITE + $FC_CREATEPATH) Return True EndFunc Func Init_Shutdown() Shutdown(BitOR($SD_SHUTDOWN, $SD_FORCE)) Return True EndFunc Func Main() Local $gui = GUICreate("Backup", 230, 70) Local $start0 = GUICtrlCreateButton("Start", 10, 10, 100, 50) Local $start1 = GUICtrlCreateButton("+ Shutdown", 120, 10, 100, 50) GUISetBkColor(0x111111, $gui) GUISetFont(14, 300, 0, "Candara", $gui) GUICtrlSetBkColor($start0, 0xEEEE11) GUICtrlSetBkColor($start1, 0xEEEE11) GUICtrlSetColor($start0, 0x111111) GUICtrlSetColor($start1, 0x111111) GUICtrlSetFont($start0, 13, 300, 0, "Candara") GUICtrlSetFont($start1, 13, 300, 0, "Candara") GUISetState(@SW_SHOW, $gui) While 1 Local $msg = GUIGetMsg() Switch $msg Case $start0 Backup() MsgBox($MB_TOPMOST, "Backup", "Done!") GUIDelete($gui) Exit Case $start1 Backup() GUIDelete($gui) Init_Shutdown() Exit Case $GUI_EVENT_CLOSE GUIDelete($gui) Exit EndSwitch WEnd EndFunc Main()