大漠荒颜

记录一个青海油田子弟生活的点点滴滴

本机最低延时批处理与VBS

| |
17:05 , 北纬36度

维护通道用
批处理:boot.bat
以下为引用的内容:
@echo off
:loop
ping 127.0.0.1 -n 2 & if not exist \\192.168.0.251\2008boot$ goto loop
call \\192.168.0.251\2008boot$\boot.bat
exit
vbs:boot.vbs
以下为引用的内容:
Set shell = Wscript.createobject("wscript.shell")
a = shell.run ("boot.bat",0)

vbs的作用是防止启动bat的时候出现黑框
批处理会每隔大约2秒检查一次服务器目录\\192.168.0.251\2008boot$ (这个改成你自己 的),如果存在就启动,不存在就继续检查,至到存在为止。
类别:MY IT TEXT | Tags: , | 0 条评论, 1032 次阅读
网友评论(0):
发表评论:

昵称: 
电邮:
网址: