diff --git a/Setup-SMTPGraphRelay.ps1 b/Setup-SMTPGraphRelay.ps1 index e3e7849..2e27bce 100644 --- a/Setup-SMTPGraphRelay.ps1 +++ b/Setup-SMTPGraphRelay.ps1 @@ -1137,17 +1137,33 @@ function Show-Menu { Clear-Host Write-Title "SMTPGraphRelay - Verwaltung" - # --- HIER: Installationspfad & Version anzeigen --- Write-Host "Installationspfad: $InstallPath" -ForegroundColor DarkGray $installedVerInfo = Get-InstalledVersion -TargetPath ($InstallPath) - if ($installedVerInfo) { - Write-Host "Installierte Version: $($installedVerInfo.Version)" -ForegroundColor DarkGray + $installedVerStr = if ($installedVerInfo) { [string]$installedVerInfo.Version } else { $null } + + if ($installedVerStr) { + Write-Host "Installierte Version: $installedVerStr" -ForegroundColor DarkGray + + # Online-Pruefung im Hintergrund (mit Timeout-Sicherung) + try { + $remoteInfo = Get-RemoteVersion + $remoteVerStr = [string]$remoteInfo.Version + + $cmp = Compare-RelayVersions -Installed ($installedVerStr) -Remote ($remoteVerStr) + if ($cmp -lt 0) { + Write-Host "Update verfuegbar: $remoteVerStr (Installiert ist $installedVerStr)" -ForegroundColor Yellow + } else { + Write-Host "Status: Auf dem neuesten Stand" -ForegroundColor DarkGray + } + } catch { + Write-Host "Status: Online-Pruefung fehlgeschlagen (kein Internet?)" -ForegroundColor DarkGray + } } else { Write-Host "Installierte Version: (Nicht installiert / Unbekannt)" -ForegroundColor DarkGray } + Write-Host "----------------------------------------------------------" -ForegroundColor DarkGray - # ----------------------------------------------------------------- Write-Host " [1] Neuinstallation aus Gitea" Write-Host " [2] Installation reparieren"