Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set /p ANSWER="Set mode (Auto/Manual): "
- if %ANSWER% == Auto (
- netsh interface ip set address "Ethernet" dhcp
- netsh interface ip set dns "Ethernet" dhcp
- ) else if %ANSWER% == Manual (
- netsh interface ip set address "Ethernet" static 192.168.1.10 255.255.255.0 192.168.1.1
- netsh interface ip set dns "Ethernet" static 8.8.8.8
- ) else (
- echo Wrong input!
- pause
- exit /b
- )
- netsh interface ip show address
- netsh interface ip show dns
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement