Re: Get Windows Group Name
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: Fri, 1 Jul 2005 08:57:19 -0500
Can you p/invoke the LookupAccountName API, passing in the SID of the group
you want to use? Everyone and Authenticated Users are both well-known SID
values that don't change, so that might be a good way to get the localized
It is too bad that the .NET MQ API won't take a SID directly as then you
would not have this problem.
"Simon Niederberger" <email@example.com> wrote in message
> I need to create a MessageQueue in my C# service (running as SYSTEM).
> will have no permissions on this queue, so I can't look if messages are
> present. When setting MessageQueue.SetPermissions, I have the problem of
> knowing the Windows Group Name. I'd like to set Full Control to either
> or Everyone (doesn't really matter), but the service might run under
> (Users, Everyone) or German Windows (Benutzer, Jeder). On a German
> SetPermissions failes with "Everyone" and succeeds with "Jeder".
> How can I get the locale-specific name of a role, say "Users"?
> Or is there a much easier way to set Full Control Permissions on a
> MessageQueue for Everyone?
> Thanks a lot