Dusti
Lt. Junior Grade
- Registriert
- Aug. 2008
- Beiträge
- 311
Moin zusammen,
ich weis nicht, ob ich grad zu blöd bin oder so, aber ich bekomme es nicht hin, dass CMD eine Auswahl prüft.
Ich habe ein Script erstellt, das den Proxy Einstellen soll.
das sieht so aus:
Das klappt auch soweit, mein Problem dabei ist jetzt, dass wenn etwas anderes eingegeben wird, er eine melden ausgeben soll, dass die Auswahl falsch war und er die Auswahl noch mal anzeigt.
Es soll also sowas wie
sein, das Funktioniert jedoch nicht.
Kann mir einer helfen?
Gruß
Dusti
ich weis nicht, ob ich grad zu blöd bin oder so, aber ich bekomme es nicht hin, dass CMD eine Auswahl prüft.
Ich habe ein Script erstellt, das den Proxy Einstellen soll.
das sieht so aus:
Code:
echo off
echo ##############################################
echo #### ####
echo #### Bitte Auswahl treffen ####
echo.#### ####
echo #### 1 = Proxy Setzen ####
echo #### 2 = Proxy Einschalten ####
echo #### 3 = Proxy Ausschalten ####
echo #### 0 = Exit ####
echo #### ####
echo ##############################################
echo.
set /P auswahl=Bitte Auswahl treffen(0-3):
set zahl=3
if /i "%wahl%"=="1" goto:set
if /i "%wahl%"=="2" goto:ein
if /i "%wahl%"=="3" goto:aus
if /i "%wahl%"=="0" goto:exit
:set
Proxy-SET.reg
goto exit
:ein
Proxy-EIN.reg
goto exit
:aus
Proxy-AUS.reg
goto exit
:exit
Exit
Das klappt auch soweit, mein Problem dabei ist jetzt, dass wenn etwas anderes eingegeben wird, er eine melden ausgeben soll, dass die Auswahl falsch war und er die Auswahl noch mal anzeigt.
Es soll also sowas wie
Code:
if /i %wahl% GTR 3 (echo Falsche Auswahl!)
Kann mir einer helfen?
Gruß
Dusti