Add Registry Standard Access Rights #145
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The description of registry access rights in MSDN is divided into two categories: standard access rights and specific access rights.
https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights
If standard access permissions are not supported, access will be denied due to excessive application permissions during use.
for example:
The access permissions of keys in HKLM are very limited, they are all readable, but other permissions are not sure.
For the permissions of the administrators group, there are special permissions in addition to read-only.
The following are the permissions of special permissions.
When I want to delete the key in HKLM, I can only choose KEY_SET_VALUE (Required to create, delete, or set a registry value.) in the code at present, but there is no create and set permission at present, and it will return Access is denied.
But if you only use the delete permission, there will be no problem.