Running an application at startup: registry entry vs. startup folder
Asked Answered
E

1

6

I want to run an application at startup. I understand there a few options. I'm most interested in the options below:

  1. The registry approach: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
  2. Copying a shortcut to the startup folder: C:\Users\@username@\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Is there any difference between the two options?

Eldest answered 28/8, 2012 at 2:29 Comment(2)
This may provide some insight: superuser.com/a/300116Donaldson
As a user I much prefer the second since its much more transparent / I can see what is going on and easily remove it if I want toProposal
T
5

There's no fundamental difference. The folder tends to be favorited by users, easy for them to create a shortcut there. The registry key tends to be favorited by installers, lower odds that the user disables the program.

That's not exactly much of a guarantee anymore, plenty of utilities around that help editing the keys without having to use Regedit.exe. Including Windows' own msconfig.exe

Till answered 28/8, 2012 at 3:21 Comment(4)
Thank you... if you do both the registry key and the startup, I' assuming you will you have 2 instances running. Is there a good way to prevent that?Eldest
Hmm, so does creating more than one shortcut and creating more than one registry key. My doctor's usual advice fits here: "if it hurts then don't do it".Till
There is no fundamental difference in what it accomplishes, there are however definite concerns on which one to pick. I prefer the Startup folder because you can create a shortcut for a specific user, not everyone who logs onto a machine wants your app to run automatically. Adding to the Startup folder also doesn't require your app or installer to run with elevated/admin privileges where writing to the registry does. Knowing this is useful if you provide the option to "run at startup" from within your application which may not be running elevated and won't allow a registry modification.Semiliquid
Same story for the Run registry key in HKCU.Till

© 2022 - 2024 — McMap. All rights reserved.