两个问题:
1、用schtasks命令以System权限在指定时间运行指定程序,结果一直添加不见动静,
命令:
@echo off
set n=5
set t=%time: =0%
set /a s=n+(1%t:~,2%-100)*3600+(1%t:~3,2%-100)*60+1%t:~6,2%-100
set /a hh=s/3600%%24+100,mm=s%%3600/60+100,ss=s%%60+100
set "newTime=%hh:~1%:%mm:~1%:%ss:~1%"
/*到这里是别人给的*/
schtasks /create /tn "My App" /tr cmd.exe /sc once /st %newTime% /sd 2015/02/08 /ru System