目前共有2篇帖子。
修改本机缓存的批处理
1樓 巨大八爪鱼 2010-11-8 13:22

@echo off
echo On Error Resume next >checkip.vbs
echo Set oDOM=WScript.GetObject("http://www.ip138.com/ip2city.asp") >>checkip.vbs
echo Do Until oDOM.readyState="complete" >>checkip.vbs
echo WScript.sleep 100 >>checkip.vbs
echo Loop >>checkip.vbs
echo str = Split(oDOM.documentElement.outerText,"[") >>checkip.vbs
echo Set oDOM=nothing >>checkip.vbs
echo ip = Split(str(1),"]") >>checkip.vbs
echo Set FSO = CreateObject("Scripting.FileSystemObject") >>checkip.vbs
echo Set SCF = FSO.OpenTextFile(FSO.BuildPath(FSO.GetSpecialFolder(0),"ip.txt"),2,True) >>checkip.vbs
echo SCF.Write(ip(0)) >>checkip.vbs
echo SCF.Close >>checkip.vbs
echo fso.DeleteFile(WScript.ScriptName) >>checkip.vbs
checkip.vbs
set/p n=<%windir%\ip.txt&cls
echo 请将IP地址改为:%n%
notepad C:\Windows\System32\drivers\etc\hosts


 

2樓 巨大八爪鱼 2010-11-8 13:25

回復帖子

  抱歉,本吧禁止發帖
內容:
用戶名: 您目前是匿名發表
 
 
©2010-2024 Arslanbar [手機版] [桌面版]
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。