电脑技术学习

本机最低延时批处理与VBS应用

dn001

维护通道用批处理:boot.bat

以下为引用的内容:
@echo off
:loop
ping 127.0.0.1 -n 2 & if not exist 192.168.0.2512008boot$ goto loop
call 192.168.0.2512008boot$boot.bat
exit

vbs:boot.vbs

以下为引用的内容:
Set shell = Wscript.createobject("wscript.shell")
a = shell.run ("boot.bat",0)

vbs的作用是防止启动bat的时候出现黑框

批处理会每隔大约2秒检查一次服务器目录192.168.0.2512008boot$ (这个改成你自己 的),如果存在就启动,不存在就继续检查,至到存在为止。

标签: