I know that this tropic is old, but here is the solution that I used in case he needs it. As indicated above, I could not find any API for this and should have worked directly in the registry key in which the seat is stored. Overlay keys must be edited:
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Ole \ DefaultAccessPermission
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Ole \ DefaultLaunchPermission
Permissions are stored in binary form. You can try my code:
static class ComACLRights { public const int COM_RIGHTS_EXECUTE = 1; public const int COM_RIGHTS_EXECUTE_LOCAL = 2; public const int COM_RIGHTS_EXECUTE_REMOTE = 4; public const int COM_RIGHTS_ACTIVATE_LOCAL = 8; public const int COM_RIGHTS_ACTIVATE_REMOTE = 16; } static void Main(string[] args) { SetCOMSercurityAccess("testuser", "DefaultAccessPermission"); SetCOMSercurityAccess("testuser", "DefaultLaunchPermission"); } private static void SetCOMSercurityAccess(string username, string regKey) {
This code is mostly inspired by this answer.
source share