views:

326

answers:

2

I need my application installer set the program to auto-startup for all users. Then each individual user should be able to modify this option without affecting others.

Currently I write to HKLM/../Run with installer, which acomplishes the first task. But then I can't disable autorun for current user, because deleting th HKLM/../Run entry would disable it for everybody.

Is there a way to do that, without using shortcuts in Autostart folder?

+2  A: 

start it for all users always but check a configuration variable in HKLU to see if it should exit immediately

SpliFF
eureka! Though, loading the executable would be inefficient.Should write a batch script to check the HKLU value.. heard it's possible to access registry through windows command line.
Maleev
given how long windows takes to start as is I doubt it would even be noticeable, especially if you exit at the earliest possible moment, however a batch file of loader is a good idea provided you are comfortable working with them.
SpliFF
@SpliFF - Maybe windows takes a long time to start is because everyone thinks like this?
Nifle
A: 

Any reason not to use the HKCU Run key in the first place?

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
sascha
Installer should make it autostart for every user.
Maleev
If you're using Windows Installer you can still do that no problem tho.
sascha