½ÃÀÛÇÁ·Î±×·¥ µî·Ï (WINDOW 2008)
C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
DHCP ÇÒ´ç¾ÆÀÌÇÇ °íÁ¤À¸·Î º¯°æ(BATCH)
@echo off
for /f "tokens=2 delims=:" %%G in ('ipconfig ^| find "IPv4"') do set ip=%%G%
for /f "tokens=2 delims=:" %%G in ('ipconfig ^| find "¼ºê³Ý"') do set mask=%%G%
for /f "tokens=6 delims= " %%G in ('ipconfig ^| find "ÀÌ´õ³Ý"') do set dev=%%G%
::IP, Subnet Mask, Default Gateway, DNS Servers º¯¼ö ¼±¾ð
set ip=%ip:~1%
set mask=%mask:~1%
set gate=218.236.115.193
set dns=220.90.215.11
set dev=%dev:~0,1%
::°íÁ¤À¸·Î º¯°æÇÏ´Â ºÎºÐ
netsh -c int ip set address name="·ÎÄà ¿µ¿ª ¿¬°á %dev%" source=static addr=%ip% mask=%mask% gateway=%gate% gwmetric=0
netsh -c int ip set dns name="·ÎÄà ¿µ¿ª ¿¬°á %dev%" source=static addr=%dns% register=PRIMARY