Show warning before installing windows

This commit is contained in:
Manuel Thalmann 2023-06-20 16:06:07 +02:00
parent 5706c5efc7
commit a80ac15677

View file

@ -10,4 +10,7 @@ function Invoke-Diskpart {
$drives = & wmic volume get "DriveLetter,Label"; $drives = & wmic volume get "DriveLetter,Label";
$drive = $($($drives | Select-String -Pattern "winiso") -split "\s+")[0]; $drive = $($($drives | Select-String -Pattern "winiso") -split "\s+")[0];
Write-Warning "Attention: This program will completely wipe your current disk #1 and install Windows on it. Are you sure you want to do this?"
Read-Host -Prompt "Hit enter to continue or CTRL+C to abort"
& "$drive\setup.exe"; & "$drive\setup.exe";