Managing Startup Keys

  • Thread starter Thread starter shumaker
  • Start date Start date
S

shumaker

I am putting a key for my application to run at startup in
SOFTWARE\Microsoft\Windows\CurrentVersion\Run

My goal is to allow individual users to toggle this on and off, so I
was placing the key under CurrentUser.

However, I want the program to default to starting up for the user the
first time any user logs in after it is installed. In the past we had
installed the key under local machine, but this means that removing the
key as per one users request will affect all users.

Also I am not sure if users will always have permission to remove keys
from Local machine? This would make it impossible in some cases for a
user to disable the run at startup feature if the key was added to
local machine during installation.

So I am not sure the best way to handle this and was open to ideas that
will give me these things:
1. After installation by an administrator, the program will default to
starting up when any user logs in.
2. Each user can disable/enable the run at startup feature via an
options menu, and this option will be specific for each user.

Thanks in advance.
 
Keep the key in HKEY_CURRENT_USER so that each individual user can turn it
off
The subkeys under HKEY_USERS contain the HKEY_CURRENT_USER hive for each
user that has ever logged on to the system, as well as a default user
profile for any new users. When installing, simply enumerate all the subkeys
in HKEY_USERS and add the setting to each user you find there. That should
cause the default behaviour you want

/claes
 
That sounds good. Thanks.

Claes said:
Keep the key in HKEY_CURRENT_USER so that each individual user can turn it
off
The subkeys under HKEY_USERS contain the HKEY_CURRENT_USER hive for each
user that has ever logged on to the system, as well as a default user
profile for any new users. When installing, simply enumerate all the subkeys
in HKEY_USERS and add the setting to each user you find there. That should
cause the default behaviour you want

/claes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top