Posts Tagged Netstat
Inserting a Wait in a Batch File, Using Netstat in a Login Script
So you want to pause a batch file for a few seconds. Unfortunately windows doesn’t provide a very simple way of doing this. I wanted to run ‘netstat -b’ 25 seconds after a user logged into their computer as to give the computer enough time to start up all background applications. But, there is no wait function in batch files. Well I found a workaround. If you use the ‘-n’ argument with the ping command you can specify the amount of time to run a ping for. Thus ping -n 60 127.0.0.1 will ping your local host for 60 seconds. This will more or less keep the batch file at a standstill for a specified number of seconds before continuing. In my case I used it for a pause in a login script.
Read the rest of this entry »