Home > Net >  C # how to invoke the Win32 Api SetNamedSecurityInfo set registry, service and folder permissions
C # how to invoke the Win32 Api SetNamedSecurityInfo set registry, service and folder permissions

Time:09-29

Such as:
Under the administrator user roles, registry, service operation is no problem, but not under the admin role will not be able to modify the registry "HKEY_LOCAL_MACHINE \ SOFTWARE" | services start to stop operation, such as online to have a Win32 Api SetNameSecurityInfo said the document can change permissions, your copy for the demo, all wrong, who is a great god can provide the complete c # useful demo, thank you!

CodePudding user response:

Don't sink, oneself's top, and this problem is really hard for you guys

CodePudding user response:

The problem is not difficult,
In simple terms, think through SetNameSecurityInfo to bypass the administrator, doesn't work,


SetNameSecurityInfo want the call is successful, ask the caller to have administrator privileges, or the caller is the owner of pObjectName, or have WRITE_DAC access,


CodePudding user response:

refer to the second floor github_36000833 response:
problem is not difficult,
In simple terms, think through SetNameSecurityInfo to bypass the administrator, doesn't work,


SetNameSecurityInfo want the call is successful, ask the caller to have administrator privileges, or the caller is the owner of pObjectName, or have WRITE_DAC access,


Brothers,
Is there any way to make the program under the administrator can do those operations, security software is how to do?
  •  Tags:  
  • C#
  • Related