失落的紀錄

2011-05-24

自動取得改變IP

分類: 批次相關 — 番茄 @ 22:58

@echo off
@if %1* neq 0* mshta vbscript:createobject("wscript.shell").run("%~s0 0",0)(window.close)&exit

set IP=10.194.1.89
set SUB=255.255.255.128
set GW=10.194.1.125
set DNS1=168.95.1.1
set DNS2=168.95.192.1

netsh interface ip set address name="區域連線" static %IP% %SUB% %GW% 1
netsh interface ip set dns name="區域連線" static %DNS1%
netsh interface ip add dns name="區域連線" %DNS2%

exit
—————————————————————————–
@echo off
netsh interface ip set address name="區域連線" dhcp
netsh interface ip set dns name="區域連線" Source=dhcp
——————————————————————————
@echo off
@if %1* neq 0* mshta vbscript:createobject("wscript.shell").run("%~s0 0",0)(window.close)&exit

set IP=10.194.1.89
set SUB=255.255.255.0
set GW=10.194.1.1
set DNS1=168.95.1.1
set DNS2=168.95.192.1

netsh interface ip set address name="區域連線" static %IP% %SUB% %GW% 1
netsh interface ip set dns name="區域連線" static %DNS1%
netsh interface ip add dns name="區域連線" %DNS2%

exit

無迴響

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress