Originally posted by lxmxn at 2006-12-2 06:01 PM:
Re 515808051:
不知道你试过了没有,也不知道行不行,上面的批处理就是按你楼顶说的意思写的啊。如果不行,可以说说哪些堮..
运行 闪一下 什么都没 大概什么意思能说明一下吗
如果改:(-n)去掉 就显示关机。。。。。。
@echo off
ping
www.cn-dos.net (-n) 1 >nul 2>nul || (shutdown -s -t 1800
:KO
ping
www.baidu.com (-n) -1 >nul 2>nul && shutdown -a ||goto KO)
goto :eof
=====================================
不想在麻烦大家了 在次多谢了 如果还能帮忙一下 就尽量吧
我的想法 以下
按原来
@echo off
:开始
ping 202.100.199.8
if errorlevel 1 goto end
goto 开始
:end
shutdown -s -t 600
exit
是ping XXX.XXX.XXX.XXX 随意 主要是ping通 就不执行下一步命令
有没有 ping 通 也要执行下一步命令
没想到 批处理 比 Adobe Photoshop 还难学。。。。
如果不行就算了 先到处找相关的帖子看看 学习学习
Originally posted by lxmxn at 2006-12-2 06:01 PM:
Re 515808051:
I don't know if you've tried it, and I don't know if it works. The above batch script is written according to what you said in the first post. If it doesn't work, you can say which...
Running it, it flashes and nothing happens. Can you explain what it probably means?
If you remove (-n), it shows shutdown...
@echo off
ping
www.cn-dos.net (-n) 1 >nul 2>nul || (shutdown -s -t 1800
:KO
ping
www.baidu.com (-n) -1 >nul 2>nul && shutdown -a ||goto KO)
goto :eof
=====================================
Don't want to trouble everyone anymore. Thanks again. If you can help further, please do your best.
My idea is as follows
According to the original
@echo off
:start
ping 202.100.199.8
if errorlevel 1 goto end
goto start
:end
shutdown -s -t 600
exit
It's to ping XXX.XXX.XXX.XXX randomly. The main thing is that if it pings through, it doesn't execute the next command.
Whether it pings through or not, it has to execute the next command.
Didn't expect that batch processing is more difficult to learn than Adobe Photoshop...
If it's not possible, it's okay. First, I'll look around for relevant posts to study.