Browse Source

Создал(а) 'setup.au3'

master
paravis 3 years ago
parent
commit
6bf7e6243a
  1. 181
      setup.au3

181
setup.au3

@ -0,0 +1,181 @@
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#NoTrayIcon
Opt("ExpandEnvStrings", 1)
DirCreate("%Temp%\Win_Installer")
FileInstall("Res\no10x86.exe", "%Temp%\Win_Installer\no10x86.exe")
FileInstall("Res\w10.cmd", "%Temp%\Win_Installer\w10.cmd")
FileInstall("Res\main.bmp", "%Temp%\Win_Installer\main.bmp")
FileInstall("Res\mainEF.bmp", "%Temp%\Win_Installer\mainEF.bmp")
FileInstall("Res\w101.bmp", "%Temp%\Win_Installer\w101.bmp")
FileInstall("Res\w102.bmp", "%Temp%\Win_Installer\w102.bmp")
FileInstall("Res\w103.bmp", "%Temp%\Win_Installer\w103.bmp")
FileInstall("Res\w71.bmp", "%Temp%\Win_Installer\w71.bmp")
FileInstall("Res\w72.bmp", "%Temp%\Win_Installer\w72.bmp")
FileInstall("Res\w73.bmp", "%Temp%\Win_Installer\w73.bmp")
FileInstall("Res\TC1.bmp", "%Temp%\Win_Installer\TC1.bmp")
FileInstall("Res\TC2.bmp", "%Temp%\Win_Installer\TC2.bmp")
FileInstall("Res\TC3.bmp", "%Temp%\Win_Installer\TC3.bmp")
FileInstall("Res\reboot1.bmp", "%Temp%\Win_Installer\reboot1.bmp")
FileInstall("Res\reboot2.bmp", "%Temp%\Win_Installer\reboot2.bmp")
FileInstall("Res\reboot3.bmp", "%Temp%\Win_Installer\reboot3.bmp")
FileInstall("Res\w7.cmd", "%Temp%\Win_Installer\w7.cmd")
FileInstall("Res\TCx86.bat", "%Temp%\Win_Installer\TCx86.bat")
FileInstall("Res\src_x86.bat", "%Temp%\Win_Installer\src_x86.bat")
FileInstall("Res\no7x86.exe", "%Temp%\Win_Installer\no7x86.exe")
RunWait("%Temp%\Win_Installer\src_x86.bat", '', @SW_HIDE)
Func detect_efi($type_sortie = "no")
DllCall("kernel32.dll", "int", "GetFirmwareEnvironmentVariableA", "str", "", "str", "{00000000-0000-0000-0000-000000000000}", "ptr", NULL , "dword", 0)
$dll_error = DllCall("kernel32.dll", "dword", "GetLastError")
If ($dll_error[0] = 1) Then
$MainImagebtn10 = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w102.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w103.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
$MainImagebtn7 = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w72.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w73.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
$MainImagebtnTC = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC2.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC3.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
$MainImagebtnR = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot2.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot3.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
GUICreate("Windows Setup by Paravis", 572, 323, -1, -1, $WS_POPUP)
GUICtrlCreatePic("%Temp%\Win_Installer\main.bmp", 0, 0, 572, 323)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
$iBtn10 = GUICtrlCreateButton("", 55, 78, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtn10, 4)
$iBtn7 = GUICtrlCreateButton("", 55, 124, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtn7, 4)
$iBtnTC = GUICtrlCreateButton("", 55, 170, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtnTC, 4)
$iBtnR = GUICtrlCreateButton("", 55, 216, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtnR, 4)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
;~ exit
Case $iBtn10
GUISetState(@SW_HIDE)
RunWait(@TempDir & "\Win_Installer\W10.cmd", "", @SW_HIDE)
GUISetState(@SW_SHOW)
Case $iBtn7
GUISetState(@SW_HIDE)
RunWait(@TempDir & "\Win_Installer\W7.cmd", "", @SW_HIDE)
GUISetState(@SW_SHOW)
Case $iBtnTC
GUISetState(@SW_HIDE)
RunWait(@TempDir & "\Win_Installer\TCx86.bat", "", @SW_HIDE)
GUISetState(@SW_SHOW)
Case $iBtnR
Shutdown(2)
EndSwitch
WEnd
Else
$MainImagebtn10 = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w102.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w103.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
_GUIImageList_AddBitmap($MainImagebtn10, "%Temp%\Win_Installer\w101.bmp")
$MainImagebtn7 = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w72.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w73.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
_GUIImageList_AddBitmap($MainImagebtn7, "%Temp%\Win_Installer\w71.bmp")
$MainImagebtnTC = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC2.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC3.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
_GUIImageList_AddBitmap($MainImagebtnTC, "%Temp%\Win_Installer\TC1.bmp")
$MainImagebtnR = _GUIImageList_Create(462, 40)
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot2.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot3.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
_GUIImageList_AddBitmap($MainImagebtnR, "%Temp%\Win_Installer\reboot1.bmp")
GUICreate("Windows Setup by Paravis", 572, 278, -1, -1, $WS_POPUP)
GUICtrlCreatePic("%Temp%\Win_Installer\mainEF.bmp", 0, 0, 572, 278)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
$iBtn10 = GUICtrlCreateButton("", 55, 78, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtn10, 4)
$iBtnTC = GUICtrlCreateButton("", 55, 124, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtnTC, 4)
$iBtnR = GUICtrlCreateButton("", 55, 170, 462, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
_GUICtrlButton_SetImageList(-1, $MainImagebtnR, 4)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
;~ exit
Case $iBtn10
GUISetState(@SW_HIDE)
RunWait(@TempDir & "\Win_Installer\W10.cmd", "", @SW_HIDE)
GUISetState(@SW_SHOW)
Case $iBtnTC
GUISetState(@SW_HIDE)
RunWait(@TempDir & "\Win_Installer\TCx86.bat", "", @SW_HIDE)
GUISetState(@SW_SHOW)
Case $iBtnR
Shutdown(2)
EndSwitch
WEnd
EndIf
EndFunc
detect_efi("no")
Loading…
Cancel
Save