Ganti IP dengan Batch file

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

:menuLOOP
echo.
echo.===== CHANGE IP =====
echo.
for /f “tokens=1,2,* delims=_ ” %%A in (‘”findstr /b /c:”:menu_” “%~f0″”‘) do echo. %%B %%C
set choice=
echo.&set /p choice=Pilih salah satu lalu Atau tekan ENTER untuk keluar: ||GOTO:EOF
echo.&call:menu_%choice%
GOTO:menuLOOP

::———————————————————–
:: menu functions follow below here
::———————————————————–

:menu_1 IP Rumah
netsh interface ip set address local static 192.168.0.2 255.255.255.0 192.168.0.1 1
cls
GOTO:EOF

:menu_2 IP Office
netsh interface ip set address local static 192.168.10.8 255.255.255.0 192.168.10.10 1
netsh interface ip set dns name=”Local Area Connection” source=dhcp
netsh interface ip set dns “Local Area Connection” static 202.22.242.3 primary
cls
GOTO:EOF

:menu_3 Gading Indonet
netsh interface ip set address local static 192.168.20.8 255.255.255.0 192.168.20.10 1
netsh interface ip set dns “Local Area Connection” static 202.22.3.242 primary
cls
GOTO:EOF

:menu_Q Check IP
cls
echo.————————————————————————————
ipconfig /all
echo.————————————————————————————
GOTO:EOF

sumber : kaskus.us

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s