diff --git a/Set-ELP-Host.ps1 b/Set-ELP-Host.ps1 index 950a3cf..6aa2dc1 100644 --- a/Set-ELP-Host.ps1 +++ b/Set-ELP-Host.ps1 @@ -1,16 +1,18 @@ # Path INI-Datei $iniPath = "C:\EDP\ELP\ELP.ini" +Write-Host "`n" + # Print menue -Write-Host "Bitte wählen Sie den Zielserver aus:`n" -Write-Host "1 = 192.168.112.10 (ELW)" -Write-Host "2 = 172.20.2.24 (DRK Spaichingen)" -Write-Host "3 = edp-schulung.drk-spa.de (DRK Schulung)" +Write-Host "Bitte EDP-Server bestimmen:`n" +Write-Host "1 = 192.168.112.10 (ELW RK TUT 50/11-1)" +Write-Host "2 = 172.20.2.101 (DRK Spaichingen)" +#Write-Host "3 = edp-schulung.drk-spa.de (DRK Schulung)" Write-Host "9 = 127.0.0.1 (Lokaler Server)" Write-Host "" # Read userinput -$wahl = Read-Host "Ihre Auswahl (1, 2, 3 oder 9)" +$wahl = Read-Host "Ihre Auswahl (1 bis 9)" # select IP from userinput switch ($wahl) @@ -21,7 +23,7 @@ switch ($wahl) } "2" { - $neueIP = "172.20.2.24" + $neueIP = "172.20.2.101" } "3" { @@ -33,7 +35,7 @@ switch ($wahl) } Default { - Write-Host "Ungültige Auswahl. Vorgang abgebrochen." -ForegroundColor Red + Write-Host "Unbekannte Auswahl. Vorgang abgebrochen." -ForegroundColor Red exit } } @@ -50,10 +52,23 @@ if (Test-Path $iniPath) Set-Content -Path $iniPath -Value $iniInhalt #Print promt - Write-Host "`nDie Host-IP wurde erfolgreich auf '$neueIP' geändert." -ForegroundColor Green + Write-Host "`nDer EDP-Server wurde auf '$neueIP' gewechselt." -ForegroundColor Green } else { #Print Errer 404 Write-Host "Die Datei '$iniPath' wurde nicht gefunden." -ForegroundColor Red + exit } + +$wahl = Read-Host "Soll EDP Einsatzleitplatz gestartet werden? (Y/n)" + +if ($wahl -in @("Y", "y", "1", "")) +{ + Write-Host "Starte EDP Einsatzleitplatz..." + Start-Process "C:\EDP\ELP\ELP.exe" +} +else +{ + Write-Host "EDP wird nicht gestartet" +} \ No newline at end of file