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 want to run a few programs / files on logon, so I'm using Task Scheduler, rather than the Startup folder or scripts, because certain programs require UAC elevation and Task Scheduler's "Run with highest privileges" will suppress prompts, I believe.



The first action never exits properly, so, as task actions are synchronous, only the first action is ever run.

So, does anyone know how to make tasks asynchronous or have any other suggestions?



Startup - Triggers Startup - Actions

share|improve this question
why would you use task scheduler for starting programs after logon? Use the startup location under "All programs". Copy the shortcuts to executables to this folder and it will run all programs after you login. Task scheduler is for somethin else. – mnmnc Dec 18 '12 at 11:22
if you absolutely must use task scheduler then create a .bat file to start the programs for you and place the bat file in scheduled task. – mnmnc Dec 18 '12 at 11:37
Use CMD /C "start notepad.exe &" to start the programs. This might allow calling other jobs while previous are still running – mnmnc Dec 18 '12 at 15:26
@mnmnc Nope. Error: Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again. – mythofechelon May 7 '13 at 14:49
you must enclose the path to the program in double quotes. – mnmnc May 7 '13 at 15:14
up vote 2 down vote accepted

I came here based on a comment discussion on SO

Honestly, I have programs in my startup menu which require admin privledges that seem to run fine without any intervention on my part.

Have you tried to put these programs in the Group Policy Logon/off Scripts? Under Computer Configuration, Windows Settings. I'm not sure if this will work for you. There may be some other solution based on Group Policies - but they go a bit over my head.

However, I came to post my comment as requested - which I've modified it based on your actual question:

Task Scheduler tasks are asynchronous, in the sense that they run in sequence. If you want all tasks to run at the same time (in parallel) the easiest would be to create multiple tasks to run at the same time (or on the same event, e.g. At Logon). Use the 'Delay task' advanced option to stagger their start order if desired.

share|improve this answer
I think you meant to say that task actions are serialised. – Neil May 10 '13 at 18:55
I wrote what I meant to say a·syn·chro·nous [ey-sing-kruh-nuhs] adjective 1. not occurring at the same time. 2. (of a computer or other electrical machine) having each operation started only after the preceding operation is completed. 3. Computers, Telecommunications. of or pertaining to operation without the use of fixed time intervals ( opposed to synchronous ). – aland May 10 '13 at 19:16
That's not the definition I'm used to. I did find this definition which matches my expectation: – Neil May 10 '13 at 19:32

I have a batch file that starts each program. Because I want all the programs to run asyncronously AND also with a delay between each one (as the first 2 programs take around 10-15 seconds to fully start-up), I use 'ping localhost -n 15 >nul' between each program line for the delays.

Works very well and means I only have one Task in TS.

Example batch file:

@echo off
::Start prog 1
"C:\Program Files\prog1\prog1.exe"

::Need to wait 15 seconds for it to start
ping localhost -n 15 >nul

:: Start prog 2
:: Further progs & delays here if required, etc,etc...
share|improve this answer

Because the first program in the list of actions that started is still running, the waiting script handler in the task scheduler will never run the second program until the first completes. It's meant to start either a single program/action or a series of short running actions. Here, you want to run each action as a separately scheduled task.

share|improve this answer
That is exacly why i suggested to use the startup as it allows concurrent starts. Also bat script will provide a wait time and multiple concurrent execution of programs. – mnmnc Dec 18 '12 at 15:22
@mnmnc But I wish to start programs that require UAC elevation (Fraps, for example) but without the actual prompt coming up, which scheduling a task can do and the startup folder cannot (as far as I know). – mythofechelon May 7 '13 at 14:14

You can run a scheduled task from a batch file by using the following command:

C:\Windows\System32\schtasks.exe /run /tn "????????"

Where ???????? is the name of the scheduled task. For example, if you create a folder under Task Scheduler Library named MyApps, and under that you create a task called Fraps, your command will look like this:

C:\Windows\System32\schtasks.exe /run /tn "MyApps\Fraps"

You can even use this in a shortcut to launch fraps directly without UAC.

But in this case, I would simply start Fraps first, then in the General tab tick the option Run Fraps when Windows starts.

share|improve this answer

You must log in to answer this question.

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