views:

89

answers:

1

Hello,

I want to do something:

i have a LARGE batch file, but this is what i want to apply to HOLE the batch:

After 30 Minutes, it should display a message.

How is this possible, and can i set this to the hole batch. I kinda have a lot of stuff in it.

+2  A: 

you can download sleep.exe from the windows resource kit. OR you can use ping. Otherwise, here's an implementation with vbscript

WScript.Sleep WScript.Arguments.Item(0) 'in milliseconds.

save as sleep.vbs and use it in your batch

cscript /nologo sleep.vbs 3000
ghostdog74
But, the user should be able to work while the countdown is ticking...
YourComputerHelpZ
It's not going to lock the machine, just the console window that the batch file is running in
Binary Worrier
o no sorry it works
YourComputerHelpZ
but how do i redirect users when the countdown is over? (using GOTO) and i was not talking about the machine, but the batch file. but that seems to work fine?
YourComputerHelpZ
i understand it, but '3000' is not 30 minutes, thats 3 seconds. can you please answer my question above
YourComputerHelpZ
30*60*1000, `%SystemRoot%\system32\calc.exe`. Have fun!
Boldewyn
@yourcomputerhelpz , if you think you need to change it to minutes, its easy to do. i am sure you how to convert millisecond to minutes. learn to fish by yourself.
ghostdog74
@ghostdog74 , yeah iknow it. I was in a quite sleepy mood so i did not think of calculating it my myself. Well, thanks!
YourComputerHelpZ