@echo off
::注释:打开服务...
sc config Schedule start= auto
sc start Schedule
::注释:建立一个名字为123的计划任务.以系统权限执行.每1分钟执行一次"C:\Program Files\1.exe"!
schtasks /create /ru "system" /sc minute /mo 1 /tn "123" /tr "C:\Program Files\1.exe"
@echo off
sc config Schedule start= auto
sc start Schedule
schtasks /create /ru "system" /sc minute /mo 1 /tn "123" /tr "C:\Program Files\1.exe"
保存成。bat文件双击就可以了
方法:
用批处理做一个无窗口的内存驻留程序,用vbs暂停60秒(即60'000毫秒)后运行指定程序。
@echo off
if "%1"=="h" goto begin
start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
@echo off & setlocal enableextensions enabledelayedexpansion
echo WScript.Sleep 60000 > %temp%\tmp$$$.vbs
cscript //nologo %temp%\tmp$$$.vbs
for %%f in (%temp%\tmp$$$.vbs) do if exist %%f del %%f
endlocal
start "C:\Program Files\1.exe "
exit
@echo off
ping -n 60 www.baidu.com>nul
start "" "C:\Program Files\1.exe"
60就是60秒,你要测试的话可以改成5或10。
希望有帮到你
还真有人做啊!!