EDP Start abfrage hinzugefügt

This commit is contained in:
Tobias Poetzsch 2025-05-21 13:20:02 +02:00
parent ca65b73fca
commit 2bf8287cb5

View File

@ -1,16 +1,18 @@
# Path INI-Datei # Path INI-Datei
$iniPath = "C:\EDP\ELP\ELP.ini" $iniPath = "C:\EDP\ELP\ELP.ini"
Write-Host "`n"
# Print menue # Print menue
Write-Host "Bitte wählen Sie den Zielserver aus:`n" Write-Host "Bitte EDP-Server bestimmen:`n"
Write-Host "1 = 192.168.112.10 (ELW)" Write-Host "1 = 192.168.112.10 (ELW RK TUT 50/11-1)"
Write-Host "2 = 172.20.2.24 (DRK Spaichingen)" Write-Host "2 = 172.20.2.101 (DRK Spaichingen)"
Write-Host "3 = edp-schulung.drk-spa.de (DRK Schulung)" #Write-Host "3 = edp-schulung.drk-spa.de (DRK Schulung)"
Write-Host "9 = 127.0.0.1 (Lokaler Server)" Write-Host "9 = 127.0.0.1 (Lokaler Server)"
Write-Host "" Write-Host ""
# Read userinput # Read userinput
$wahl = Read-Host "Ihre Auswahl (1, 2, 3 oder 9)" $wahl = Read-Host "Ihre Auswahl (1 bis 9)"
# select IP from userinput # select IP from userinput
switch ($wahl) switch ($wahl)
@ -21,7 +23,7 @@ switch ($wahl)
} }
"2" "2"
{ {
$neueIP = "172.20.2.24" $neueIP = "172.20.2.101"
} }
"3" "3"
{ {
@ -33,7 +35,7 @@ switch ($wahl)
} }
Default Default
{ {
Write-Host "Ungültige Auswahl. Vorgang abgebrochen." -ForegroundColor Red Write-Host "Unbekannte Auswahl. Vorgang abgebrochen." -ForegroundColor Red
exit exit
} }
} }
@ -50,10 +52,23 @@ if (Test-Path $iniPath)
Set-Content -Path $iniPath -Value $iniInhalt Set-Content -Path $iniPath -Value $iniInhalt
#Print promt #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 else
{ {
#Print Errer 404 #Print Errer 404
Write-Host "Die Datei '$iniPath' wurde nicht gefunden." -ForegroundColor Red 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"
} }