Start a Program at Startup with Task Scheduler
This guide shows you how to use Windows Task Scheduler to launch any program automatically when you log in or when the computer starts. You’ll set up a basic task that runs your chosen app every time, without needing third-party software. You’ll need a Windows PC (7, 8, 10, or 11) and the full path to the program’s executable file.
What You’ll Need
- A Windows account with permission to create tasks (standard user is fine for personal tasks).
- The full path to the program you want to start (e.g.,
C:\Program Files\MyApp\app.exe). To find it, right-click the program’s shortcut and select “Open file location,” then copy the path from the address bar. - Optional: any command-line arguments the program needs (like a specific file to open).
Step-by-Step
- Press Windows + R, type
taskschd.msc, and press Enter. This opens Task Scheduler. - In the right-hand “Actions” pane, click Create Basic Task…. The wizard opens.
- Give the task a name (e.g., “Launch Notepad at Startup”) and optionally a description. Click Next.
- Choose the trigger. For starting at login, select When I log on. If you want it to start before any user logs in (e.g., for a service-like app), choose When the computer starts — but that usually requires admin rights. Click Next.
- Select Start a program and click Next.
- In the “Program/script” field, either type the full path to the executable (with quotes if it contains spaces) or click Browse… to locate it. If you need arguments, enter them in the “Add arguments” field. Click Next.
- Review the summary and click Finish. Your task is now created and will run at the next logon.
- To test it immediately, right-click the task in the list and select Run. The program should launch.
Common Mistakes
- Wrong trigger: Choosing “At startup” when you actually want “At log on” — the former runs before you log in and may fail for GUI apps.
- Missing quotes: If the path has spaces (like
C:\Program Files\...), you must enclose it in quotes in the Program/script field, otherwise Windows may try to run “C:\Program” and fail. - Using a shortcut file: Task Scheduler expects an executable (.exe, .cmd, .bat), not a .lnk shortcut. If you only have a shortcut, right-click it and “Open file location” to get the actual .exe.
- Not setting “Run whether user is logged on or not”: For tasks that must run at startup (before login), you need to check that option in the task’s properties, and you’ll be prompted for the password.
Tips
- Use the Conditions tab in task properties to avoid starting the program on battery power (laptops) or only when the network is available.
- Set a delay in the Settings tab (like “Delay task for 30 seconds”) to let the system settle before launching heavy apps.
- If the program needs admin rights, check “Run with highest privileges” in the task’s properties. This will trigger a UAC prompt at startup unless you set it to run whether the user is logged on or not.
- You can also use the Triggers tab to add multiple triggers (e.g., at logon and at a specific time).
Troubleshooting
- Program doesn’t start: Check the “Last Run Result” column in Task Scheduler. A code like 0x2 means the file wasn’t found — verify the path. 0x41303 means the task is disabled or the trigger didn’t fire.
- Program starts but immediately closes: Some programs need a working directory. In the task’s properties, under “Start in,” enter the folder where the executable resides (e.g.,
C:\Program Files\MyApp). - Task runs but nothing appears: If you selected “Run whether user is logged on or not,” the program runs in the background without a visible window. Change to “Run only when user is logged on” for GUI apps.
- Can’t create task due to permissions: If you get an access denied error, try running Task Scheduler as administrator (right-click and “Run as administrator”).
- Task is disabled after a while: Windows may disable tasks that fail repeatedly. Check the task’s “Settings” tab — uncheck “Stop task if it runs longer than” and ensure “Enabled” is checked.
Frequently Asked Questions
Can I use Task Scheduler to start a program as administrator?
Yes. In the task’s properties, check “Run with highest privileges.” You’ll need to enter the admin password when you set it up, and the program will launch with elevated rights.
What’s the difference between “At startup” and “At log on”?
“At startup” runs when Windows boots, before any user logs in. “At log on” runs when a specific user logs in. For most desktop apps, use “At log on” because they need a desktop session.
Can I make the program start minimized or with specific arguments?
Yes. In the “Add arguments” field, you can pass command-line options. For example, to start Notepad with a specific file, enter the file path as an argument. To start minimized, some programs accept a flag like /min or -minimized — check the program’s documentation.
Will the task run if I’m not connected to the internet?
Yes, Task Scheduler runs tasks locally regardless of internet. However, if the program needs internet to function, it may fail to connect.
How do I stop the program from starting at startup?
Open Task Scheduler, find the task, right-click and select “Disable” (keeps it for later) or “Delete” (removes it permanently).
Can I export the task to use on another computer?
Yes. Right-click the task and select “Export…” to save an XML file. On the other computer, open Task Scheduler and click “Import Task…” to load it.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.