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