Ticker

6/recent/ticker-posts

Easy Way To Change Ip Address With Batch File

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

=========================================================================

2. If you see a font with a red list, it means that it represents the name of your network interface, while the font with an orange list is the static ip that you will use, thSave with bat extension, example ip.bat

3. Run ip.bat As Administrator 
Run ip.bat As Administrator

4. A display like the image below appears
ip.bat menu display

5. Chose one if you enter A value to chacnge static ip address and if you enter B to change DHCP Ip address at your interface

Post a Comment

0 Comments