From 70b37233d5643e2baff168f3172099ce76789950 Mon Sep 17 00:00:00 2001 From: paravis Date: Thu, 11 Apr 2024 15:50:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=B4?= =?UTF-8?q?=20=D0=BD=D0=BE=D0=B2=D1=83=D1=8E=20=D1=81=D0=B1=D0=BE=D1=80?= =?UTF-8?q?=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Change_bootloader.au3 | 48 ++++++++++--------------------------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/Change_bootloader.au3 b/Change_bootloader.au3 index 40bd6dd..2d39856 100644 --- a/Change_bootloader.au3 +++ b/Change_bootloader.au3 @@ -3,20 +3,16 @@ #include #NoTrayIcon #RequireAdmin - #pragma compile(Stripper, True) -#pragma compile(ProductVersion, 3.0.0) +#pragma compile(ProductVersion, 3.0.1) #pragma compile(ProductName, "Change bootLoader") #pragma compile(FileDescription, CBL) -#pragma compile(LegalCopyright, paravis.ru@2023) -#pragma compile(CompanyName, paravis.ru@2023) - +#pragma compile(LegalCopyright, paravis.ru@2024) +#pragma compile(CompanyName, paravis.ru@2024) Opt("ExpandEnvStrings", 1) - $sDisk = StringLeft(@ScriptDir, 2) -$boot = ($sDisk & "efi\Paravis\Boot") -$kitchen = ($sDisk & "efi\Paravis\Boot\kitchen") -$bootice = ($sDisk & "efi\Paravis\Boot\kitchen\bootice.exe") +$boot = ($sDisk & "\efi\Paravis\Boot") +$bootice = ($sDisk & "\efi\Paravis\Boot\bootice.exe") $main = GUICreate("Change BootLoader", 390, 125, 318, 213) GUICtrlCreateGroup("Legacy BIOS", 3, 3, 384, 61) GUICtrlSetFont(-1, 8, 800, 0, "Tahoma") @@ -34,7 +30,6 @@ GUICtrlSetFont(-1, 8, 800, 0, "Tahoma") $xoru = GUICtrlCreateButton("Install Xorboot (SecureBoot OFF)", 200, 80, 180, 33) GUICtrlSetFont(-1, 8, 800, 0, "Tahoma") GUISetState(@SW_SHOW, $main) - Func _hide() GUICtrlSetState($xor, $gui_disable) GUICtrlSetState($bmgr, $gui_disable) @@ -42,7 +37,6 @@ Func _hide() GUICtrlSetState($bmgru, $gui_disable) GUICtrlSetState($xoru, $gui_disable) EndFunc - Func _show() GUICtrlSetState($xor, $gui_enable) GUICtrlSetState($bmgr, $gui_enable) @@ -50,8 +44,6 @@ Func _show() GUICtrlSetState($bmgru, $gui_enable) GUICtrlSetState($xoru, $gui_enable) EndFunc - - While 1 Switch GUIGetMsg() Case $gui_event_close @@ -69,7 +61,7 @@ While 1 FileDelete(@ScriptDir & "Paravis") FileDelete($sDisk & "\bootmgr") FileDelete($sDisk & "\grldr") - FileCopy($boot & "\mgr\bootmgr", $sDisk & "bootmgr") + FileCopy($boot & "\mgr\bootmgr", $sDisk & "\bootmgr") RunWait($bootice & " /DEVICE=" & $sDisk & " /mbr /install /type=nt60 /quiet") RunWait($bootice & " /DEVICE=" & $sDisk & " /pbr /install /type=bootmgr /quiet") MsgBox(0 + 64 + 262144, "Bootmgr", "bootloader successfully changed!") @@ -78,7 +70,7 @@ While 1 _hide() FileDelete($sDisk & "\bootmgr") FileDelete($sDisk & "\grldr") - FileCopy($boot & "\g4d\grldr", $sDisk & "grldr") + FileCopy($boot & "\g4d\grldr", $sDisk & "\grldr") RunWait($bootice & " /DEVICE=" & $sDisk & " /mbr /install /type=GRUB4DOS /quiet") RunWait($bootice & " /DEVICE=" & $sDisk & " /pbr /install /type=GRUB4DOS /quiet") MsgBox(0 + 64 + 262144, "Grub4Dos", "Bootloader successfully changed!") @@ -87,34 +79,16 @@ While 1 _hide() FileDelete($sDisk & "\efi\boot\bootx64.efi") FileDelete($sDisk & "\efi\boot\bootia32.efi") - FileDelete($sDisk & "\efi\boot\bx86.pf") - FileDelete($sDisk & "\efi\boot\hx86.pf") - FileDelete($sDisk & "\efi\boot\x86.pf") - FileDelete($sDisk & "\efi\boot\bx64.pf") - FileDelete($sDisk & "\efi\boot\hx64.pf") - FileDelete($sDisk & "\efi\boot\x64.pf") - FileCopy($kitchen & "\UEFIx64\mgrx64.efi", $sDisk & "\efi\boot\bootx64.efi") - FileCopy($kitchen & "\UEFIx86\mgrx86.efi", $sDisk & "\efi\boot\bootia32.efi") + FileCopy($sDisk & "\efi\Paravis\Boot\mgr\UEFI\bootx64.efi", $sDisk & "\efi\boot\bootx64.efi") + FileCopy($sDisk & "\efi\Paravis\Boot\mgr\UEFI\bootia32.efi", $sDisk & "\efi\boot\bootia32.efi") MsgBox(0 + 64 + 262144, "UEFI Bootmgr", "Bootloader successfully changed!") _show() Case $xoru _hide() FileDelete($sDisk & "\efi\boot\bootx64.efi") FileDelete($sDisk & "\efi\boot\bootia32.efi") - FileDelete($sDisk & "\efi\boot\bx86.pf") - FileDelete($sDisk & "\efi\boot\hx86.pf") - FileDelete($sDisk & "\efi\boot\x86.pf") - FileDelete($sDisk & "\efi\boot\bx64.pf") - FileDelete($sDisk & "\efi\boot\hx64.pf") - FileDelete($sDisk & "\efi\boot\x64.pf") - FileCopy($kitchen & "\UEFIx64\bootx64.efi", $sDisk & "\efi\boot\bootx64.efi") - FileCopy($kitchen & "\UEFIx86\bootia32.efi", $sDisk & "\efi\boot\bootia32.efi") - FileCopy($kitchen & "\UEFIx86\bx86.pf", $sDisk & "\efi\boot\bx86.pf") - FileCopy($kitchen & "\UEFIx86\hx86.pf", $sDisk & "\efi\boot\hx86.pf") - FileCopy($kitchen & "\UEFIx86\x86.pf", $sDisk & "\efi\boot\x86.pf") - FileCopy($kitchen & "\UEFIx64\bx64.pf", $sDisk & "\efi\boot\bx64.pf") - FileCopy($kitchen & "\UEFIx64\hx64.pf", $sDisk & "\efi\boot\hx64.pf") - FileCopy($kitchen & "\UEFIx64\x64.pf", $sDisk & "\efi\boot\x64.pf") + FileCopy($sDisk & "\efi\Paravis\Boot\xor\UEFIx64\bootx64.efi", $sDisk & "\efi\boot\bootx64.efi") + FileCopy($sDisk & "\efi\Paravis\Boot\xor\UEFIx86\bootia32.efi", $sDisk & "\efi\boot\bootia32.efi") MsgBox(0 + 64 + 262144, "UEFI Xorboot", "Bootloader successfully changed!") _show() EndSwitch