Jump to content

XPero's utilities


XPero

Recommended Posts


Hi XPero, you used "BUILDIN\Adminstrators" to grant control. This code snippet retrives the translated Name (in German: VORDEFINIERT\Administratoren"). I hope this will work. Could you include this code into your tool?

string getName(WellKnownSidType wksid)
{
SecurityIdentifier sid = new SecurityIdentifier(wksid, null);
NTAccount account = (NTAccount)sid.Translate(typeof(NTAccount));
return account.Value;
}


getName(WellKnownSidType.BuiltinAdministratorsSid)

Edited by MagicAndre1981
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...