winiso-valhalla/winfs/Scripts/Setup.ps1

14 lines
311 B
PowerShell

function Invoke-Diskpart {
param (
$script
)
$file = New-TemporaryFile;
$null = Set-Content "$file" "$script";
& diskpart -s "$file";
}
$drives = & wmic volume get "DriveLetter,Label";
$drive = $($($drives | Select-String -Pattern "winiso") -split "\s+")[0];
& "$drive\setup.exe";