Enable booting to PE

This commit is contained in:
MrMeeb 2024-08-06 18:56:59 +01:00
parent 59ec83c10a
commit 1473d34fb8
Signed by: MrMeeb
GPG Key ID: 3864A01CC606E310

View File

@ -17,6 +17,7 @@ Expand-Archive -Path $StagingDir\boot.zip -DestinationPath C:\ -Force
Write-Host "Downloading boot.wim"
Invoke-WebRequest -Uri $RemoteURL/boot.wim -OutFile C:\Sources\boot.wim
# Setup booting to PE next boot
function BootToPE {
@ -78,4 +79,9 @@ function BootToPE {
}
Remove-Item -Path $StagingDir -Recurse
$answer = read-host "Demo armed. Ready to reboot? (y/n)"
if ($answer -eq 'y') {
BootToPE
} else {
Remove-Item -Path $StagingDir -Recurse
}