Run netstat -f in a batch file for a specific amount of time then quit and move on to the next command in the batch file?
04/04/2020 285 views
I'm running a simple batch file that will return Windows system name, an sc query, and a specific netstat foreign address. The issue is that when the netstat cmd is run in the batch, it keeps running and running and running... It eventually quits, but long after it has returned the value I'm after in first ten seconds. How can one programmatically tell netstat to stop after say 30 seconds? I don't see any time related switches in the documentation... I see I can run it every 5 seconds... I just want it to stop after 30 seconds... so the batch file can move on to the next command...