Home > OS >  Run Windows application on startup; operative differences between registry, autostart and task sched
Run Windows application on startup; operative differences between registry, autostart and task sched

Time:01-23

Recently, I once again came across the problem of having to run my Windows app on startup and wondered which of the options is the most usual one and causing least trouble long term.

Registry

Add string value of the path to your exe to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.

  • Feels the most natural
  • Fairly easy, especially when using frameworks simplifying registry entry creation
  • When uninstalling an application, you could end up with a dead registry entry
  • User won't be able to edit this entry

Autostart

Create a .lnk inside the user or system wide autostart folder (shell:startup).

  • Able to do it programmatically
  • Very easy to create, add arguments and modify
  • User is able to edit entries in his usual environment

Task scheduler

Create a 'When the computer starts' or 'When I log on' run entry in the Task Scheduler.

  • Able to do it programmatically
  • There is a GUI, but I would assume the average user won't find it

So what are further considerations when selecting an option?

CodePudding user response:

Registry is used most of the time, since that's the standard.

If the user wants to stop software from automatically starting, he will ALWAYS open Task Manager and turn it off via the startup tab.

The shell:startup folder is the users personal startup folder, where he can insert his shortcuts, there is a reason why Windows has multiple ways to autostart applications.

  1. Registry : Software
  2. shell:startup: User
  3. Task scheduler: Windows & User to automate tasks

CodePudding user response:

The registry and start-menu are pretty similar. The registry gives you zero control over the execution, the only setting is the command line arguments. The start-menu uses shortcuts so that gives you the ability to control the working directory and initial window state.

The task scheduler is not the traditional way to launch startup applications. It feels like overkill and that you are trying to be obscure on purpose.

  • Related