views:

300

answers:

2

Guys,

I assume this is pretty easy so here goes; I'm trying to execute these commands and then close the command prompt after Firefox opens. How do I do that? I can't get back to a command prompt after "ping 127.0.0.1 -n 4>null" (i'm simulating a sleep here).

@echo off
call tskill firefox
call ping 127.0.0.1 -n 4>nul
call C:\"Program Files"\"Mozilla Firefox 3"\firefox
call exit

Thanks in advance.

+1  A: 

you can use 'start' to start the process separately. For instance:

@echo off
ping 127.0.0.1
start IEXPLORE.EXE "http://www.stackoverflow.com"

I used IEXPLORE because I didn't want to look up the path to firefox. Adjust for your preferences.

digitaljoel
+3  A: 

actually if you just do:

@echo off
call ping 127.0.0.1
start http://www.stackoverflow.com

the url will open in your default web browser. surrounding the url with quotes seems to mess it up.

-don

Don Dickinson