Persisting Application Scoped Settings

C

Chris Dunaway

What what I have read, Application Scoped settings in the setting file
are read only. Why is this? Is there a good reason for this
restriction?

I understand that some settings will be different for each user of the
app, hence the User Scoped settings. User scoped settings can be
changed and persisted at runtime.

But there are also settings that are not User Scoped (i. e.
Application Scoped) that still might need to be changed at runtime,
yet this is not possible. Why? Again, is there some good technical
reason for this restriction?

What alternatives are available to me to be able to persist
Application Scoped settings?

Thanks,

Chris
 
P

Peter Duniho

What what I have read, Application Scoped settings in the setting file
are read only. Why is this? Is there a good reason for this
restriction?

One good reason is that application-scoped settings are generally things
that should be set or changed only during program installation or by an
administrator.
[...]
What alternatives are available to me to be able to persist
Application Scoped settings?

The "old" mechanism should work fine: create a registry key under
HKEY_LOCAL_MACHINE and store your settings there. You will, of course,
need administrator privileges to do that, which is as it should be (no
regular user should be able to do anything that will affect any other
user).

Pete
 
N

Nigel Aston

I thought Microsoft were going away from using the Registry and instead
just using files. Do you know if this is true - would you recommend
continuing to use the registry?
Nigel
 

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

Top