整套命令运行已遍以后会在拼本机及244的机器这里无线循环,再也无法整套命令一起运行了
求高手指点
- @echo off
- :a
- ping 127.0.0.1 -n 3
- setlocal enabledelayedexpansion
- ping 192.168.8.244&&goto :a||goto :reboot
- set a=0
- :reboot
- ping 127.0.0.1 -n 3
- set /a a+=1
- if !a!==3 (goto :bbb) else (ping 192.168.8.244&&goto :a||goto :reboot)
- :bbb
- ping 192.168.8.250&&goto :2||goto :1
- :1
- net use z: [url=file://\\192.168.10.253\z]\\192.168.10.253\z[/url]
- ipconfig >z:\%computername%.txt
- net use z: /del
- goto :a
- :2
- net use z: [url=file://\\192.168.8.250\z]\\192.168.8.250\z[/url]
- ipconfig >z:\%computername%.txt
- net use z: /del
- goto :a
复制代码
|