我有一个脚本,我目前用来检查网络何时上升或下降.它写入pinglog.txt.
对于我的生活,我无法弄清楚如何在网络出现故障时写入事件日志.在哪里说:
Call logme(Time & " - " & machine & " is not responding to ping, CALL FOR
HELP!!!!",strLogFile)
Run Code Online (Sandbox Code Playgroud)
多数民众赞成我需要写入事件日志"机器没有重新启动ping,请求帮助!!!!
'Ping multiple computers and log when one doesn't respond.
'################### Configuration #######################
'Enter the IPs or machine names on the line below separated by a semicolon
strMachines = "4.2.2.2;8.8.8.8;8.8.4.4"
'Make sure that this log file exists, if not, the script will fail.
strLogFile = "c:\logs\pinglog.txt"
'################### End Configuration ###################
'The default application for .vbs is wscript. If you double-click …Run Code Online (Sandbox Code Playgroud) vbscript ×1