我想编个批处理,倒计时10S后运行“程序1”,然后再倒计时10S,运行“程序2“,以下是我编的代码,这样可不可行?是否哪里可以修改?或者希望老鸟帮忙编个,谢谢
::========倒计时等待10秒====================
@echo off & setlocal enableextensions
echo wscript.sleep 1000 > %temp%.\tmp$$$.vbs
set /a i = 10
:timeout
if %i% == 0 goto next
setlocal
set /a i = %i% - 1
cscript //nologo %temp%.\tmp$$$.vbs
goto timeout
goto end
::========倒计时结束后运行程序1============
:next
%systemroot%\temp\程序1.exe
for %%f in (%temp%.\tmp$$$.vbs*) do del %%f
::========再倒计时等待10秒==================
@echo off & setlocal enableextensions
echo wscript.sleep 1000 > %temp%.\tmp$$$.vbs
set /a i = 10
:timeout
if %i% == 0 goto next
setlocal
set /a i = %i% - 1
cscript //nologo %temp%.\tmp$$$.vbs
goto timeout
goto end
::========然后倒计时结束后运行程序2============
:next
%systemroot%\temp\程序2.exe
for %%f in (%temp%.\tmp$$$.vbs*) do del %%f