Fix offline mode (#4153)

* Fix usb error on drive with no existing partitions

* fix offline mode

* Add offline banner
This commit is contained in:
Chris Titus
2026-03-04 12:21:18 -06:00
committed by GitHub
parent 7f46e8d60d
commit df17ca4695
4 changed files with 20 additions and 33 deletions

View File

@@ -9,7 +9,8 @@
param (
[string]$Config,
[switch]$Run,
[switch]$Noui
[switch]$Noui,
[switch]$Offline
)
if ($Config) {
@@ -27,6 +28,11 @@ if ($Noui) {
$PARAM_NOUI = $true
}
$PARAM_OFFLINE = $false
if ($Offline) {
$PARAM_OFFLINE = $true
}
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."