58 lines
2.1 KiB
AutoIt
58 lines
2.1 KiB
AutoIt
|
#include <ButtonConstants.au3>
|
||
|
#include <GUIConstantsEx.au3>
|
||
|
#include <StaticConstants.au3>
|
||
|
#include <WindowsConstants.au3>
|
||
|
#AutoIt3Wrapper_Icon=PMenu.ico
|
||
|
#AutoIt3Wrapper_Outfile_x64=Install Epow (Normal Mode).exe
|
||
|
#AutoIt3Wrapper_Res_Comment=Epow Setup
|
||
|
#AutoIt3Wrapper_Res_Description=Epow Setup
|
||
|
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
|
||
|
#AutoIt3Wrapper_Res_ProductName=Epow Setup
|
||
|
#AutoIt3Wrapper_Res_ProductVersion=1.0.0.0
|
||
|
#AutoIt3Wrapper_Res_CompanyName=Tyleo Softwares
|
||
|
#AutoIt3Wrapper_Res_LegalCopyright=Tyleo Softwares
|
||
|
#AutoIt3Wrapper_Res_LegalTradeMarks=Tyleo Softwares
|
||
|
#AutoIt3Wrapper_Res_Language=1033
|
||
|
#RequireAdmin
|
||
|
|
||
|
$epow_data = @ScriptDir & "\epow_data"
|
||
|
if Not FileExists($epow_data) Then
|
||
|
MsgBox(0+16,"ERROR","No " & $epow_data & " folder detected !!")
|
||
|
Exit(1)
|
||
|
Endif
|
||
|
|
||
|
; SETUP
|
||
|
$epow_setupdir = @ProgramFilesDir & "\EPOW By Tyleo"
|
||
|
$epow_desktop = @DesktopCommonDir
|
||
|
$epow_startmenu = @StartMenuCommonDir
|
||
|
|
||
|
#Region ### START Koda GUI section ### Form=
|
||
|
Global $Form1 = GUICreate("", 155, 78, 475, 344)
|
||
|
Global $Label1 = GUICtrlCreateLabel("Epow - Power Menu Toolset", 8, 8, 138, 17)
|
||
|
Global $Install = GUICtrlCreateButton("INSTALL IT !", 8, 40, 137, 25)
|
||
|
GUISetState(@SW_SHOW)
|
||
|
#EndRegion ### END Koda GUI section ###
|
||
|
|
||
|
While 1
|
||
|
$nMsg = GUIGetMsg()
|
||
|
Switch $nMsg
|
||
|
Case $GUI_EVENT_CLOSE
|
||
|
Exit
|
||
|
Case $Install
|
||
|
GUICtrlSetState($Install, $GUI_DISABLE)
|
||
|
GUICtrlSetData($Install,"WORKING")
|
||
|
DirCreate($epow_setupdir)
|
||
|
FileCopy($epow_data & "\*",$epow_setupdir)
|
||
|
FileCreateShortcut($epow_setupdir & "\Lock.exe",$epow_startmenu & "\Lock")
|
||
|
FileCreateShortcut($epow_setupdir & "\Lock.exe",$epow_desktop & "\Lock")
|
||
|
FileCreateShortcut($epow_setupdir & "\Restart.exe",$epow_startmenu & "\Restart")
|
||
|
FileCreateShortcut($epow_setupdir & "\Restart.exe",$epow_desktop & "\Restart")
|
||
|
FileCreateShortcut($epow_setupdir & "\ShutdownNow.exe",$epow_startmenu & "\Shutdown Now")
|
||
|
FileCreateShortcut($epow_setupdir & "\ShutdownNow.exe",$epow_desktop & "\Shutdown Now")
|
||
|
Sleep(450)
|
||
|
GUICtrlSetData($Install,"DONE !")
|
||
|
Sleep(800)
|
||
|
Exit(0)
|
||
|
EndSwitch
|
||
|
WEnd
|