Close batch script 5 seconds after last command?

Hi  currently have the following batch script runnign on log-on:
(see code)

I want to be able to pause the window for a set of time before it closes after the log-on sequence. Is this possible? Will I have to call in another type of script?

For example, I want the window to close about 5 seconds after "Logon Complete!!" - just enough time to display the message to users.

Thanks
Matt

title Logging you on to the domain
@echo off
@COLOR 3e
mode con:cols=80 lines=60
echo ******************************************************
echo Please Wait....                                    
ECHO Personal Settings Are being Applied to %username%  
ECHO You are currently connected to %computername%      
echo ******************************************************
echo.
echo.
echo Identifying and connecting your network drives
echo.
echo.
call \\server\netlogon\mapdrives.bat
echo Downloading your desktop icons.....
echo.
echo.
echo Downloading your Internet Favourites.....
echo.
echo.
echo Logon Complete!!

Open in new window

sys_admin_picAsked:
Who is Participating?
 
joshlunsfordCommented:
Easiest way without installing extra software is just to ping localhost
ping -n 10 127.0.0.1 > nul

Open in new window

0
 
questionCommented:
you can add a command in the last line where you need a wait.
sleep 5
thats what i would use on my batch files to give a pause of specified time.
note:
  sleep.exe is not available by default and is a part of the resource tools
you need to download from the
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
0
 
questionCommented:
Just to add the command is
      sleep      time-to-sleep-in-seconds

-- popularbhaskar
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.