@echo off
:Menu
cls
echo To be Run a administrator.
echo/
echo [1] - Dynamic IP for internet
echo [2] - Static ip for thin client 192.168.1.100
echo [3] - Exit
echo/
choice /C 1234 /N /M "Your choice: "
echo/
if errorlevel 3 goto :EOF
if errorlevel 2 goto StaticIP
rem User has taken first choice as being the only remaining choice.
echo Dynamic IP (default)
echo/
echo Enabling DHCP
netsh interface ip set address "Local Area Connection" source=dhcp
netsh interface ip set dnsservers "Local Area Connection" source=dhcp
netsh interface ip show config "Local Area Connection"
pause
goto Menu
:StaticIP
echo Setting 192.168.1.100
netsh interface ip set address "Local Area Connection" static "192.168.1.100" "255.255.255.0" "192.168.1.1"
echo/
pause
goto Menu