# Simpel Batch-file for running applications.



## Bejne

I'm trying to work out how to run two applications using a batch-file.

I'm running a program that needs me to ping my router continiously, but now I want to create a batchfile that will start the ping run as well as the application. can this be done?

My batch-file for the pinging is like this:

%SystemRoot%\system32\cmd.exe /k ping -t 192.168.0.1

I have tried the following: 

C:\Program\Application\Application.exe

%SystemRoot%\system32\cmd.exe /k ping -t 192.168.0.1

However this only starts the application, is there a simple way to get the pinging to start after i ha started the application?


----------



## Resolution

What you are trying is very simple, so i'm not sure why you are having problems. Can you show us the exact lines you have in the batch file?


----------



## Bejne

Thess are the exact lines:

C:\Program\Application\Application.exe

%SystemRoot%\system32\cmd.exe /k ping -t 192.168.0.1

What it does is that it starts the windows application but it doesnt run the ping sequense.

The file is named application.bet and I run it by clicking it on my desktop


----------



## Resolution

Add "start" to the front of the first line...



Code:


[B]start[/B] C:\Program\Application\Application.exe

%SystemRoot%\system32\cmd.exe /k ping -t 192.168.0.1

Is this what you want?

Also, the following line is not necessary...

%SystemRoot%\system32\cmd.exe /k


----------



## Cache

Hi,

Sometimes (for whatever reason) you need to place two double-quotes before the application path. Like so:



Code:


start "" C:\Program\Application\Application.exe


----------

