Last active
October 22, 2020 19:29
-
-
Save ishowta/b5676c8852eec3805a7636d4433f7f04 to your computer and use it in GitHub Desktop.
[WIP] Monitor iphone & quest battery dead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set errmes=ARP エントリが見つかりませんでした。 | |
set iphone=192.168.11.3 | |
set quest=192.168.11.12 | |
arp -d %iphone% | |
ping %iphone% -n 1 -w 10000 | |
arp -a %iphone% > tmpfile | |
set /p res= < tmpfile | |
if "%res%"=="%errmes%" ( | |
msg * "iPhone is dead!" | |
) | |
arp -d %quest% | |
ping %quest% -n 1 -w 10000 | |
arp -a %quest% > tmpfile | |
set /p res= < tmpfile | |
if "%res%"=="%errmes%" ( | |
msg * "quest is dead!" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
qiita: Windowsでcronみたいな事をやらせる