|
|
|
@ -3,20 +3,16 @@
|
|
|
|
|
#include <file.au3> |
|
|
|
|
#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 |
|
|
|
|