From 1473d34fb8d1823707a42c472e0d6e1e92dc031b Mon Sep 17 00:00:00 2001 From: MrMeeb Date: Tue, 6 Aug 2024 18:56:59 +0100 Subject: [PATCH] Enable booting to PE --- payload/run.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/payload/run.ps1 b/payload/run.ps1 index 0b93437..c1d8b66 100644 --- a/payload/run.ps1 +++ b/payload/run.ps1 @@ -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 \ No newline at end of file +$answer = read-host "Demo armed. Ready to reboot? (y/n)" +if ($answer -eq 'y') { + BootToPE +} else { + Remove-Item -Path $StagingDir -Recurse +} \ No newline at end of file