(自动检测F:盘是否存在,如果存在启动几个指定服务。如果不存在延时五分钟再次检测。检测两次还是不存在就自动退出脚本。)
http://www.dqwglm.com/article/html/list23-1.html
举报
Local $iTimes = 2, $sDrivePath = "F:", $sServices = "lanmanserver lanmanworkstation" Local $sCommand = '@echo off&set "services=' & $sServices & '"&for %a in (!services!) do sc start %a' For $i = 1 To $iTimes If FileExists($sDrivePath) Then Run("cmd /v:on /c " & $sCommand) ExitLoop Else Sleep(5000) EndIf Next
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-27 21:49 , Processed in 0.088889 second(s), 19 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.