Wait for internet connection before Windows installation

This commit is contained in:
Manuel Thalmann 2024-09-22 23:57:12 +02:00
parent 731eb7e31a
commit 9cc284e086

View file

@ -95,6 +95,14 @@ $null = New-Module {
& {
$initialized = $false;
# Ping digitalcourage DNS server
# https://digitalcourage.de/
Write-Host "Waiting for internet connection…";
while ((Test-Connection -Count 1 5.9.164.112).Status -ne 'Success') {
Start-Sleep 0.1;
}
while (-not $initialized) {
if ($IsWindows) {
if (-not ((Test-Command "choco") -and (Test-Command "refreshenv"))) {