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

@@ -1,26 +0,0 @@
function Test-WinUtilInternetConnection {
<#
.SYNOPSIS
Tests if the computer has internet connectivity
.OUTPUTS
Boolean - True if connected, False if offline
#>
try {
# Test multiple reliable endpoints
$testSites = @(
"8.8.8.8", # Google DNS
"1.1.1.1", # Cloudflare DNS
"208.67.222.222" # OpenDNS
)
foreach ($site in $testSites) {
if (Test-Connection -ComputerName $site -Count 1 -Quiet -ErrorAction SilentlyContinue) {
return $true
}
}
return $false
}
catch {
return $false
}
}