1. The first step is to copy all the scripts below
=========================================================================
@echo off
echo Choose:
echo [A] Set Static IP to 10.17.8.93
echo [B] Set DHCP
echo ================================
:choice
SET /P C=[A or B]?
if [%C%]==[A] goto A
if [%C%]==[B] goto B
goto choice
:A
@echo off
echo Setting static IP address: 10.17.8.93
netsh interface ip set address "Wi-Fi" static 10.17.8.93 255.255.255.0 10.17.8.1
netsh interface ip add dns "Wi-Fi" addr="10.17.8.1"
netsh interface ip show config "Wi-Fi"
pause
goto end
:B
@echo off
echo Enabling DHCP
netsh interface ip set address "Wi-Fi" source=dhcp
netsh interface ip set dnsservers "Wi-Fi" source=dhcp
netsh interface ip show config "Wi-Fi"
pause
goto end
:end
=========================================================================
Run ip.bat As Administrator |
4. A display like the image below appears
ip.bat menu display |
0 Comments