问题
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?
回答1:
start it for all users always but check a configuration variable in HKLU to see if it should exit immediately
回答2:
Any reason not to use the HKCU Run key in the first place?
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
来源:https://stackoverflow.com/questions/882123/launch-app-on-startup-for-all-users-but-also-allow-per-user-setting-windows