Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How would one go about causing an .exe to run when a Windows system boots, and leave the .exe running regardless of who is logged in? Is this possible?

share|improve this question
up vote 2 down vote accepted

As per this Sysinternals forum post, the most reliable way to do so is to add a scheduled task. Simply define a trigger At startup. It will keep running until it is forcibly terminated, e.g. by a crash or the user killing the process. A standard/limited user can't see or kill processes they do not own.

Screenshot of scheduled task trigger
Click for full size

You also have to set the task to Run whether user is logged on or not, and probably should run as an Administrator account, with highest privileges. You can even run as the SYSTEM account.

Screenshot of scheduled task user
Click for full size

This is distinct from the At logon trigger.

If you wanted to do this programatically (i.e. make your program add itself to system startup), the best way would be to create a Windows service.

share|improve this answer
Make sure you specify that it is for every user. This will require admin username and password when scheduling the task, but the user will not have access to the password, so no worries. – cutrightjm Apr 28 '12 at 20:12
At startup has no concept of users, it runs before logon. At logon does care and does have that option, but that's not the question. – Bob Apr 28 '12 at 20:14
Wasn't aware you could run programs on startup, does that mean before the user logs in? Because that kind of seems like a security issue. – cutrightjm Apr 28 '12 at 20:18
Yes, before users log in. However, I was mistaken. It appears (see the edit) that you still have to specify the user to run as, though not run for. – Bob Apr 28 '12 at 20:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.