检测Internet连接并自动关闭系统[关闭]


1

我使用256 kbps互联网连接..所以我会在晚上完全下载,因为我的问题是...

有一段时间互联网连接将被断开,到sysytem将会整夜运行,

所以我需要通过检测网络连接来避免这个问题。

是否有任何免费软件,它将检测互联网的状态并在互联网断开时关闭系统,或者在互联网断开时点击任何exe文件,因此我将其路由到shutdown exe快捷方式。

提前致谢


您还没有提到您正在使用的操作系统。
ChrisInEdmonton

Answers:


1

一种可能的解决方案是运行一个脚本,该脚本将在Internet无法访问时关闭计算机。下面是我掀起的一个示例脚本(没有太多测试),

它使用Windows Server 2003资源工具包工具中包含的sleep.exe ,或者另一种可能是从此处下载类似的程序。

@Echo Off
:loop
sleep 600
ping -n 1 www.google.com> NUL
if errorlevel 1 shutdown -s
goto loop

注意:睡眠参数取决于您选择使用的版本。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.