How do I pause for 60 sec in Command Shell

G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.misc (More info?)

I am writing a BAT file to run an application when a user logs into the
domain. I need to have my file wait for 60 seconds before it continues to
the next command in the file. I know that in Windows 2000 you can use the
SLEEP command but I cannot find any commands like that in Window NT.

I even thought to run a counter loop which whould take some time to execute
but I don't know how to do that either. :(

Anybody with a quick solution?

- Pat
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.misc (More info?)

Patrick:

If you install the Windows NT Resource Kit on the machine in which the
script is running, you will be able to use the TIMEOUT and SLEEP
commands. For a less intrusive approach, you can just copy the
TIMEOUT.EXE and SLEEP.EXE into the System32 directory of the machine.

--
Matt Wagner
Enterprise Engineering Center
Microsoft Corporation

Legal Disclaimer:
This posting is provided "AS IS" with no warranties, and confers no
rights. Use of included script samples are subject to the terms
specified at http://www.microsoft.com/info/cpyright.htm Please do not
send e-mail directly to this alias. This alias is for newsgroup purposes
only.


Dunphy, Patrick wrote:
> I am writing a BAT file to run an application when a user logs into the
> domain. I need to have my file wait for 60 seconds before it continues to
> the next command in the file. I know that in Windows 2000 you can use the
> SLEEP command but I cannot find any commands like that in Window NT.
>
> I even thought to run a counter loop which whould take some time to execute
> but I don't know how to do that either. :(
>
> Anybody with a quick solution?
>
> - Pat
>
>
 

lee

Distinguished
Mar 30, 2004
635
0
18,980
Archived from groups: microsoft.public.windowsnt.misc (More info?)

"Dunphy, Patrick" <pdunphy@neo.rr.com> wrote in message news:<etqi6kCyEHA.4064@TK2MSFTNGP10.phx.gbl>...
> I am writing a BAT file to run an application when a user logs into the
> domain. I need to have my file wait for 60 seconds before it continues to
> the next command in the file. I know that in Windows 2000 you can use the
> SLEEP command but I cannot find any commands like that in Window NT.
>
> I even thought to run a counter loop which whould take some time to execute
> but I don't know how to do that either. :(
>
> Anybody with a quick solution?
>
> - Pat

Easiest solution is to borrow the CHOICE.COM file from Win9x platform,
put it in the system32 folder and then do:
choice /c:d /td,60>NUL
in the batch file for a 60 second wait. Change the 60 for how
many seconds you want. CHOICE.COM is only 28k and does work on NT
just like it does in 95, 98 or ME.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.misc (More info?)

An option that doesn't require any other files:

echo Hi
ping -n 61 127.0.0.1>nul
echo Hi 60 seconds later

Ray at work


"Dunphy, Patrick" <pdunphy@neo.rr.com> wrote in message
news:etqi6kCyEHA.4064@TK2MSFTNGP10.phx.gbl...
>I am writing a BAT file to run an application when a user logs into the
>domain. I need to have my file wait for 60 seconds before it continues to
>the next command in the file. I know that in Windows 2000 you can use the
>SLEEP command but I cannot find any commands like that in Window NT.
>
> I even thought to run a counter loop which whould take some time to
> execute but I don't know how to do that either. :(
>
> Anybody with a quick solution?
>
> - Pat
>