Re: Get Windows Group Name

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 07/01/05


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
version.

It is too bad that the .NET MQ API won't take a SID directly as then you
would not have this problem.

Joe K.

"Simon Niederberger" <simon@sincore.ch> wrote in message
news:ecrHLBYfFHA.3904@TK2MSFTNGP14.phx.gbl...
> Hi
>
> I need to create a MessageQueue in my C# service (running as SYSTEM).
> Users
> 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
> Users
> or Everyone (doesn't really matter), but the service might run under
> English
> (Users, Everyone) or German Windows (Benutzer, Jeder). On a German
> Windows,
> 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
> Simon
>
>