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
About this entry
You’re currently reading “Ganti IP dengan Batch file,” an entry on vf's Weblog
- Published:
- September 26, 2009 / 7:18 am
- Category:
- Tips n Triks
- Tags:
No comments yet
Jump to comment form | comment rss [?] | trackback uri [?]