回复 2# CrLf - @echo off
- if "%1" == "h" goto begin
- mshta vbscript:createobject("wscript.shell").run("%~fs0 h",0)(window.close)&&exit
- :begin
- rem 下边开始写批处代码了
-
- ping 127.0.0.1 -n 30 >nul 2>nul
-
- sc config schedule start= demand
- net start schedule
- ——————————————————————————————————————————————————————
- :first2
-
- at 21:50 taskkill /f /im 软件xx.EXE
- at 21:50 taskkill /f /im AutoRedrCard.exe
- ping 127.0.0.1 -n 2 >nul 2>nul
- at 21:50 shutdown -s -f -t 2
-
- at 21:51 taskkill /f /im 软件xx.EXE
- at 21:51 taskkill /f /im AutoRedrCard.exe
- ping 127.0.0.1 -n 2 >nul 2>nul
- at 21:51 shutdown -s -f -t 2
-
- at 21:52 taskkill /f /im 软件xx.EXE
- at 21:52 taskkill /f /im AutoRedrCard.exe
- ping 127.0.0.1 -n 2 >nul 2>nul
- at 21:52 shutdown -s -f -t 2
-
- at 21:53 taskkill /f /im 软件xx.EXE
- at 21:53 taskkill /f /im AutoRedrCard.exe
- ping 127.0.0.1 -n 2 >nul 2>nul
- at 21:53 shutdown -s -f -t 2
-
- at 21:54 taskkill /f /im 软件xx.EXE
- at 21:54 taskkill /f /im AutoRedrCard.exe
- ping 127.0.0.1 -n 2 >nul 2>nul
- at 21:54 shutdown -s -f -t 2
-
-
- ping 127.0.0.1 -n 20 >nul 2>nul
-
- goto first2
复制代码 多谢。
开机,就循环运行这个bat代码!
为啥有时关机不了呢?屏幕上只有鼠标指针能动,桌面啥的都没有了。
就是想实现:自动判断时间自动关机 |