Wait for internet connection before Windows installation
This commit is contained in:
parent
731eb7e31a
commit
9cc284e086
1 changed files with 8 additions and 0 deletions
|
@ -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"))) {
|
||||
|
|
Loading…
Reference in a new issue