#AutoIt3Wrapper_Res_File_Add=main.bmp, rt_bitmap, MAIN_BMP #AutoIt3Wrapper_Res_File_Add=mainEF.bmp, rt_bitmap, MAINEF_BMP #AutoIt3Wrapper_Res_File_Add=w101.bmp, rt_bitmap, W101 #AutoIt3Wrapper_Res_File_Add=w102.bmp, rt_bitmap, W102 #AutoIt3Wrapper_Res_File_Add=w103.bmp, rt_bitmap, W103 #AutoIt3Wrapper_Res_File_Add=w71.bmp, rt_bitmap, W71 #AutoIt3Wrapper_Res_File_Add=w72.bmp, rt_bitmap, W72 #AutoIt3Wrapper_Res_File_Add=w73.bmp, rt_bitmap, W73 #AutoIt3Wrapper_Res_File_Add=TC1.bmp, rt_bitmap, TC1 #AutoIt3Wrapper_Res_File_Add=TC2.bmp, rt_bitmap, TC2 #AutoIt3Wrapper_Res_File_Add=TC3.bmp, rt_bitmap, TC3 #AutoIt3Wrapper_Res_File_Add=reboot1.bmp, rt_bitmap, reboot1 #AutoIt3Wrapper_Res_File_Add=reboot2.bmp, rt_bitmap, reboot2 #AutoIt3Wrapper_Res_File_Add=reboot3.bmp, rt_bitmap, reboot3 #include #include #include #include #include #include #include #include #NoTrayIcon Opt("ExpandEnvStrings", 1) DirCreate("%Temp%\Win_Installer") FileInstall("Res\w10.cmd", "%Temp%\Win_Installer\w10.cmd") FileInstall("Res\w7.cmd", "%Temp%\Win_Installer\w7.cmd") FileInstall("Res\no10x86.exe", "%Temp%\Win_Installer\no10x86.exe") FileInstall("Res\no7x86.exe", "%Temp%\Win_Installer\no7x86.exe") FileInstall("Res\TCx86.exe", "%Temp%\Win_Installer\TCx86.exe") FileInstall("Res\src_x86.exe", "%Temp%\Win_Installer\src_x86.exe") 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, "W101") _GUIImageList_AddBitmap($MainImagebtn10, "W102") _GUIImageList_AddBitmap($MainImagebtn10, "W103") _GUIImageList_AddBitmap($MainImagebtn10, "W101") _GUIImageList_AddBitmap($MainImagebtn10, "W101") _GUIImageList_AddBitmap($MainImagebtn10, "W101") $MainImagebtn7 = _GUIImageList_Create(462, 40) _GUIImageList_AddBitmap($MainImagebtn7, "W71") _GUIImageList_AddBitmap($MainImagebtn7, "W72") _GUIImageList_AddBitmap($MainImagebtn7, "W73") _GUIImageList_AddBitmap($MainImagebtn7, "W71") _GUIImageList_AddBitmap($MainImagebtn7, "W71") _GUIImageList_AddBitmap($MainImagebtn7, "W71") $MainImagebtnTC = _GUIImageList_Create(462, 40) _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") _GUIImageList_AddBitmap($MainImagebtnTC, "TC2") _GUIImageList_AddBitmap($MainImagebtnTC, "TC3") _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") $MainImagebtnR = _GUIImageList_Create(462, 40) _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") _GUIImageList_AddBitmap($MainImagebtnR, "reboot2") _GUIImageList_AddBitmap($MainImagebtnR, "reboot3") _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") RunWait(@TempDir & "\Win_Installer\src_x86.exe") FileDelete(@TempDir & "\Win_Installer\src_x86.exe") GUICreate("Windows Setup by Paravis", 572, 323, -1, -1, $WS_POPUP) GUICtrlCreatePic("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 $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.exe", "", @SW_HIDE) GUISetState(@SW_SHOW) Case $iBtnR Shutdown(2) EndSwitch WEnd Else $MainImagebtn10 = _GUIImageList_Create(462, 40) _GUIImageList_AddBitmap($MainImagebtn10, "W101") _GUIImageList_AddBitmap($MainImagebtn10, "W102") _GUIImageList_AddBitmap($MainImagebtn10, "W103") _GUIImageList_AddBitmap($MainImagebtn10, "W101") _GUIImageList_AddBitmap($MainImagebtn10, "W101") _GUIImageList_AddBitmap($MainImagebtn10, "W101") $MainImagebtnTC = _GUIImageList_Create(462, 40) _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") _GUIImageList_AddBitmap($MainImagebtnTC, "TC2") _GUIImageList_AddBitmap($MainImagebtnTC, "TC3") _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") _GUIImageList_AddBitmap($MainImagebtnTC, "TC1") $MainImagebtnR = _GUIImageList_Create(462, 40) _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") _GUIImageList_AddBitmap($MainImagebtnR, "reboot2") _GUIImageList_AddBitmap($MainImagebtnR, "reboot3") _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") _GUIImageList_AddBitmap($MainImagebtnR, "reboot1") RunWait(@TempDir & "\Win_Installer\src_x86.exe") FileDelete(@TempDir & "\Win_Installer\src_x86.exe") GUICreate("Windows Setup by Paravis", 572, 278, -1, -1, $WS_POPUP) $back = GUICtrlCreatePic("", 0, 0, 572, 278) _ResourceSetImageToCtrl($back, "MAINEF_BMP", $RT_BITMAP) 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.exe", "", @SW_HIDE) GUISetState(@SW_SHOW) Case $iBtnR Shutdown(2) EndSwitch WEnd EndIf EndFunc detect_efi("no")