Chris Moore wrote:
> I want to fettle the keys in HKEY_USERS but they are hidden away in a unique
> key S-1-5-21-xxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-31107

That value is the string representation of the user's security 
identifier (SID). To get a real SID, you can call ConvertStringSidToSid. 
Then you can call LookupAccountSid to get the account name.

To go the other way, use LookupAccountName and ConvertSidToStringSid.

There's no guarantee that a particular user's registry hive will be 
loaded and accessible via HKey_Users, though. Typically, the only hives 
loaded are the ones for accounts that are currently logged in.

> Every user has a different key, how can I determine the correct key for the
> current user?

The key of the user the program is running as is always mapped to 
HKey_Current_User.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to