什么软件要运行这长时间?找个偷懒方法,那软件肯定只是开始启动时验证日期吧?那你只需要把它启动后就把日期改回就行了,bat窗口也就可以关闭了(如果这样不行,可以把时间相对提前x天(而不是定为某日期),之后再推后x天,那就不管你那软件运行多长时间也不会错,不过这种用VBS代码较合适):
@echo off&color f1
set date0=2000-11-11
set date1=%date:,10%
echo %date0%|date>nul
:: 下一行前面不要加call 不然要等软件关闭才运行之面的代码
start "某某软件" "xxxx.exe"
::改下面50000调整延时长短
for /L %%a in (1,1,50000)do echo>nul
echo %date1%|date>nul
exit
a=lcase("你的软件名")
do
set x=getobject("winmgmts:\\.\root\cimv2").execquery("select * from win32_process where name='"&a&"'")
for each i in x
if not lcase(i.name)=a then wscript.createobject("wscript.shell").run ("net time /setsntp:time.nist.gov&w32tm /resync /nowait)>nul 2>nul"),0:exit do
next
loop
'使用后会后台监视你的软件进程 如果发现进程里不存在该软件 那么执行恢复系统时间 恢复系统时间必须确保网络正常!