.bat .cmd code help

PigFish

Junior Member
Joined
Apr 5, 2012
Messages
122
Reaction score
30
Hi,

I am after a little advice..I basically have a bat file that i have been running for the past hour with no issues.
But for some reason all of a sudden it will load up the url, then do one of 2 things

It will either stay on the page and not do anything, or open - stay on it for a few seconds - close and then not re open the page.
What i can understand is how it was working fine for over an hour and now is not, does anyone know if it is something to do with my pc or with the code itsself?

Code:
@echo off:
 
loop
Start firefox http://nullrefer.com/?http://www.websitenamehere.com
ping -n 10 127.0.0.0>nu1
taskkill /f /im firefox.exe
ping -n 5 127.0.0.0>nu1
goto loop
 
Maybe the firefox process was not ended properly with taskkill...try to put a pause before taskkill , this way you will be sure that firefox start command was fully processed.
 
He has a a pause, that 's what the ping is there for ;)
 
He has a a pause, that 's what the ping is there for ;)
...then maybe the pause is not big enough. :)
You can check from Task Manager if the Firefox process is ended at the right time.
 
Back
Top