Win32 registry key writable to everyone?

Is there a registry key that is allowed for write access for all users and is common to them?

I need to save some machine-related data in my application, but this piece of data should be machine-specific and not user-specific. HKEY_LOCAL_MACHINE is writable by the administrator only. HKEY_CURRENT_USER is writable but not shared with other users.

I think that in the Windows file system folder C: \ ProgramData (the% ALLUSERSPROFILE% environment variable) is writable by everyone and is public, but does it have something similar in the registry?

+3
source share
2 answers

The same goes for the file system, and for the registry, out of the box nothing is used between users with a limited user account. This is trivially solved by creating a directory or a registry key that has write access to everyone. An administrator or a program that works with administrator rights.

+3
source

Nope. There are only two permanent hives: HKLM and HKU. Since there are no shared hives in HKU, you will need to store shared data somewhere in HKLM. You can create your key and give it a security descriptor that allows everyone to gain full access.

+1
source

Source: https://habr.com/ru/post/1777695/


All Articles