"Danny" <fe***********@gmail.com> a écrit dans le message de news:
dc**************************@posting.google.com...
What about priviledges wouldn't that also be an advantage for using
XML over the registry? If my application wanted to write to the
registry wouldn't I have to elevate the privileges of my application
to write to the registry.
No, you don't need special privileges to write to the registry. You do need
the correct permissions on the key you want to write to, in the same way you
need write permission on a file you want to write to. Registry keys under
HKCU will normally be writable by the user (while HKLM will usually not be
modifiable by a normal user).
Among the advantages of storing config data in the registry, I can see:
* smaller application footprint (no need to load an XML parser)
* simpler validation (registry values are typed)
* fewer possibilities of data corruption (values are accessed atomically).
There are counter-arguments for all of these. I think that low-level stuff
(services, system-wide parameters) should use the registry, while
user-visible configuration is better stored in files under the profile
directory.