From 6bf7e6243adf7abbed87051c71a50d101813f97b Mon Sep 17 00:00:00 2001 From: paravis Date: Tue, 14 Jun 2022 17:32:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB(=D0=B0)=20?= =?UTF-8?q?'setup.au3'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.au3 | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 setup.au3 diff --git a/setup.au3 b/setup.au3 new file mode 100644 index 0000000..bfe6999 --- /dev/null +++ b/setup.au3 @@ -0,0 +1,181 @@ +#include +#include +#include +#include +#include +#include +#include +#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") \ No newline at end of file