Thomas
Thomas

Reputation: 3368

Cross-user registry values

I'd come to this conclusion through experience and various things I've read on this internet, but in stating it to a co-worker, it seems illogical. Can you verify the following statement is true, or provide a counter to it?

On Vista/Win7, two standard (non-elevated users) cannot read/write the same location in the registry.

Upvotes: 1

Views: 74

Answers (2)

Factor Mystic
Factor Mystic

Reputation: 26800

On Vista/Win7, two standard (non-elevated users) cannot read/write the same location in the registry.

This is a false statment

On Vista/Win7, two standard (non-elevated users) cannot write the same location in the registry in the default configuration.

But this is true. By default, users only have write access to their own hive (HKEY_CURRENT_USER) and read access to the machine hive (HKEY_LOCAL_MACHINE).

If you want to configure a location where any user can read and write, you can certainly do by configuring a key's ACL, as @Dark Falcon said. A good place for this is somewhere inside your application's key in HKEY_LOCAL_MACHINE, and at install time (when your installer has elevated privileges to do so).

Upvotes: 3

Dark Falcon
Dark Falcon

Reputation: 44201

That would be incorrect. A registry key can have an ACL specified which allows any user, elevated or not, to write to it. By default, I am not aware of any keys which have this configured, but it certainly is possible.

Upvotes: 2

Related Questions