|
|
清空iis log 中自己登录ip的vbs
发布时间:2006-11-11 15:53:39 点击:
 |
惠众OA网络办公软件演示 |
|
在线体验:http://www.oa169.com
惠众oa系统包含通知、短消息、邮件、文件收发、公文流转、共享下载、工作日程、工作日志、工作周报、工作总结、个人计划、新闻发布、教学动态(学校版)、工作日志、企业论坛、制度管理、资产管理、在线考勤、通讯录、会议管理等等。同时包含强大的文字、动画、语音提示系统。
Option Explicit
Dim sourcefile,ipaddress,objargs
const destfile="tempfile" Const ForWriting = 2
Dim Text Dim fso,objNet,ServiceObj Dim txtStream, txtStreamOut
Set objArgs = WScript.Arguments If objArgs.Count = 2 Then sourcefile=objArgs(0) ipaddress=objargs(1) Else wscript.echo "Parameter Error"+ vbcrlf wscript.Echo "USAGE:KillLog.vbs LogFileName YourIP." wscript.Quit 1 End If
Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists (sourcefile) then Set objNet = WScript.CreateObject( "WScript.Network" ) Set ServiceObj = GetObject("WinNT://" & objNet.ComputerName & "/w3svc") Set objNet=nothing ServiceObj.stop wscript.sleep 6000 Set txtStream = fso.OpenTextFile(sourcefile) Set txtStreamOut = fso.OpenTextFile(destfile, ForWriting, True) Do While Not (txtStream.atEndOfStream) Text = txtStream.ReadLine if instr(Text,ipaddress)=0 then txtStreamOut.WriteLine Text end if Loop
Set txtStream = Nothing Set txtStreamOut = Nothing
WScript.Echo "The log file-- " & sourcefile &" has cleaned your IP!" Else WScript.Echo "The Log file-- " & sourcefile & " has not found!" Wscript.quit End If fso.Copyfile destfile, sourcefile fso.deletefile destfile Set fso=Nothing ServiceObj.start Set ServiceObj = Nothing
|
OA关键词:清空iis log 中自己登录ip的vbs,asp.net asp源码 asp OA办公软件 办公自动化 无纸化办公 协同办公系统
OA信息: [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23]更多>>(后续页1 后续页2 后续页3)
|