Startup Folder Delay

McCormack

Junior Member
Apr 11, 2013
23
0
0
WinXP

I've got a Firefox.exe shortcut in my Startup folder to start my browser when I boot my computer, but when the browser starts I get a Server Not Found error message. When I refresh the browser it then connects normally. I'm thinking that if I can delay the browser starting for 15 seconds it will then load normally, and from the research I've done a batch file placed in the Startup folder will accomplish that task, but I'm not very good with batch files and I haven't been able to successfully write a file that will delay my browser from starting when I boot up my computer. Could somebody write a batch file for me that will delay my browser from starting for 15 seconds?
 

McCormack

Junior Member
Apr 11, 2013
23
0
0
Thank you for the link, KLin, but before I posted here on the forum I spent three hours on the Google machine trying to find a solution to my problem, with no luck.

Personal attack removed -- Programming Moderator Ken g6
 
Last edited by a moderator:

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,624
4,544
75
KLin posted a link that should lead you to a solution. This link, which could be found there, contains or links to at least three potential solutions: timeout, sleep, and ping.

Perhaps posting what you have tried so far would help us lead you toward a solution?
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
Since the question is answered, let me just throw in. You really REALLY should not be using windows xp at this point in time. If this is a personal computer, it is time to upgrade. If this is a company computer, I would raise the issue with your IT department.

Running Windows XP is a huge security risk.
 

McCormack

Junior Member
Apr 11, 2013
23
0
0
Thanks for the link Ken, but apparently you and KLin are under the mistaken impression that I haven't already spent a lot of time and energy trying to figure out batch files and trying get one to work on my computer to delay my browser program starting up when I boot my computer. I have put in the time and the effort, but I'm not very computer savey and I've never used a batch file before in my life and thus I'm having hard time understanding the workings of batch files, and that's why I came here to the forum, to get some help.

I'm a pretty good mechanic and participate on some auto forums, and when someone asks for help with a car problem I don't just supply them with a link to Google and tell them to go figure it out, I share my mechanical knowledge and experience with them in order to make their lives easier and get their problems solved. I was hoping that one of the knowledgeable people here on the anandtech forum would extend the same courtesy to me in regard to writing a batch file for my needs.

Here's one of the the batch files I tried and it didn't work:

@echo off
rem sleeping for 30000 milliseconds
ping -n 1 -w 30000 -4 10.0.0.0 >NUL
rem starting delayed start programs
start cmd /C "C:\Program Files\Mozilla Firefox\firefox.exe"

If someone here on the forum can help me with that, I'd sure appreciate it.
 
Last edited:

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,624
4,544
75
There! Now that I see what you wrote, I think I can improve on it. Try this:

Code:
@echo off
ping -n 16 127.0.0.1 > nul
start "C:\Program Files\Mozilla Firefox\firefox.exe"
 

McCormack

Junior Member
Apr 11, 2013
23
0
0
OK, I made a batch file using the info that you supplied, and when I tried it the command window opened but my browser didn't (see screen shot). Just to clarify, my batch file consisted verbatim of the information that you provided... do I need to put time parameters in the file? If so, I don't know how to do that. Like I said in my original post I'm looking for roughly a 15 second delay.


XoAAAAASUVORK5CYII=
 
Last edited:

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,624
4,544
75
Never saw that one before. :eek: I guess because I always used "c:\progra~1" or something, without quotes.

Edit: I meant to say, "Try this:"
Code:
@echo off
ping -n 16 127.0.0.1 > nul
start "Firefox" "C:\Program Files\Mozilla Firefox\firefox.exe"
 
Last edited:

McCormack

Junior Member
Apr 11, 2013
23
0
0
Like I said even though I tried to educate myself on the subject batch file language is hieroglyphics to me, so if someone knowledgeable on the subject won't give me a hand in writing a working start delay file for me than I guess I'm out of luck.
 

McCormack

Junior Member
Apr 11, 2013
23
0
0
Alright here's what I came finally got to work:

@echo off
PING 127.0.0.1 -n 16 >nul
start "" "C:\Program Files\Mozilla Firefox\firefox.exe"

The 16 represents 15 seconds, and the start "" closes the batch file command window after my browser opens.
 
Last edited by a moderator: