Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have three main applications.

I am trying to start them automatically at log on in a specific order with a given delay.

Here is an example of how I'd like everything to be:

User logs in.

Wait for given delay (say 1 minute to allow other start up items first.)

Run Application 1 Instance 1 w/arguments

Run Application 1 Instance 2 w/arguments

Run Application 1 Instance 3 w/arguments

Run Application 1 Instance 4 w/arguments

Run Application 1 Instance 5 w/arguments

Run Application 2 Instance 1

Run Application 2 Instance 2

Run Application 2 Instance 3

Run Application 3 Instance 1

Run Application 3 Instance 2 w/arguments

Currently I've tried a few different examples.

I've tried using a single Scheduled Task with a single Trigger (At startup with delay) and then a Start a Program action for each Application and Instance (10 Actions in total). The problem with this is the task will only run one application at a time. The application has to close before it moves on to the next and I can't one is closed before starting a new task. This doesn't help as I need all instances to be running at the same time.

I've tried making a scheduled task for each application instance with varying timers to try to start them in that order. This is tedious and doesn't always work in the proper order I want. It's also very difficult to make changes to.

Currently, my "solution" is just to create a batch file that runs everything, and use a delayed scheduled task to run the batch file. This "works" but is not ideal as the task is unable to detect if applications crash or restart them automatically (Application 2 tends to crash on network interruptions.)

Is there any solution to this? I would NOT like to download and install a third party application to handle this.

I am using Windows Vista Home Basic SP2.

share|improve this question
Your batch file can easily check whether an app's running and react accordingly. Just posted an answer here that'll help. – Karan Mar 18 '13 at 6:42

This is a two part problem.

1) Restart the application if it fails. You can create a three line script for each application.

application.exe arg1 arg2 arg3 

2) Run the applications in order. This is right up batch's ally, but you will have to use START so that it does not wait for each one to finish before starting the next one (type "start /?" on the command line).

START "App1.1" app1_1.bat
START "App1.2" app1_2.bat
START "App1.3" app1_3.bat
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .