Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :poczatek
- echo Wybierz:
- echo.
- echo 1) Pobierz z DHCP
- echo 2) 192.168.0.69
- echo 3) 192.168.1.69
- echo 4) 192.168.88.12
- echo 5) 10.10.100.98
- echo 6) 10.90.100.69
- echo 7) 10.90.110.69
- echo 8) Inny (*/32)
- echo 9) ostatni IP: & more < "%UserProfile%\Desktop\lastIP.dat":IP & echo brama: & more <"%UserProfile%\Desktop\lastIP.dat":brama
- echo 0) KONIEC
- echo.
- set /p opcja=wybierz:
- if %opcja%==1 goto opcja1
- if %opcja%==2 goto opcja2
- if %opcja%==3 goto opcja3
- if %opcja%==4 goto opcja4
- if %opcja%==5 goto opcja5
- if %opcja%==6 goto opcja6
- if %opcja%==7 goto opcja7
- if %opcja%==8 goto opcja8
- if %opcja%==9 goto opcja9
- if %opcja%==0 exit
- goto zly_wybor
- :opcja1
- netsh interface ip set address Ethernet source=dhcp
- netsh interface ip set dnsservers Ethernet source=dhcp validate=no
- exit
- :opcja2
- netsh interface ip set address Ethernet static 192.168.0.69 255.255.255.0 192.168.0.1 1
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :opcja3
- netsh interface ip set address Ethernet static 192.168.1.69 255.255.255.0 192.168.1.1 1
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :opcja4
- netsh interface ip set address Ethernet static 192.168.88.12 255.255.255.0 192.168.88.1 1
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :opcja5
- netsh interface ip set address Ethernet static 10.10.100.98 255.255.255.0 10.10.100.1 1
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :opcja6
- netsh interface ip set address Ethernet static 10.90.100.69 255.255.255.0 10.90.100.1 1
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :opcja7
- netsh interface ip set address Ethernet static 10.90.110.69 255.255.255.0 10.90.110.1 1
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :opcja8
- cls
- set /p ip=IP:
- echo.
- echo 30 - .252
- echo 29 - .248
- echo 28 - .240
- echo 27 - .224
- echo 26 - .192
- echo 25 - .128
- echo 24 - .0
- set /p cidr=Maska:
- set maska=0
- if %cidr%==30 set maska=252
- if %cidr%==29 set maska=248
- if %cidr%==28 set maska=240
- if %cidr%==27 set maska=224
- if %cidr%==26 set maska=192
- if %cidr%==25 set maska=128
- if %cidr%==24 set maska=0
- cls
- echo IP: %ip%
- echo %ip% > "%UserProfile%\Desktop\lastIP.dat":IP
- echo Maska: 255.255.255.%maska%
- echo %maska% > "%UserProfile%\Desktop\lastIP.dat":maska
- set /p brama=Brama:
- echo %brama% > "%UserProfile%\Desktop\lastIP.dat":brama
- netsh interface ip set address Ethernet static %ip% 255.255.255.%maska% %brama%
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- pause
- exit
- :opcja9
- set /p ip= <"%UserProfile%\Desktop\lastIP.dat":IP
- set /p maska= <"%UserProfile%\Desktop\lastIP.dat":maska
- set /p brama= <"%UserProfile%\Desktop\lastIP.dat":brama
- netsh interface ip set address Ethernet static %ip% 255.255.255.%maska% %brama%
- netsh interface ip set dnsservers Ethernet static 8.8.8.8 validate=no
- exit
- :zly_wybor
- echo OPCJA NIEZNANA.. WYBIERZ PONOWNIE!
- echo.
- echo.
- echo.
- goto poczatek
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement