API Reference
LocalGpoLocator
Locates Local Group Policy registry.pol paths on the local machine (machine, current user, per-user by SID).
Inheritance
- Object
- LocalGpoLocator
Methods
public static String GetAdministratorsCommentPath() #StringGets the path to the comment.cmtx for built-in Administrators (MLGPO).
public static String GetAdministratorsPolicyCommentPath() #StringGets the path to the policyComments.cmtx for built-in Administrators (MLGPO).
public static String GetAdministratorsPolPath() #StringGets the path to the per-user Registry.pol for the built-in Administrators (MLGPO).
public static String GetMachineCommentPath() #StringGets the path to the machine comment.cmtx file.
public static String GetMachinePolicyCommentPath() #StringGets the path to the machine policyComments.cmtx file.
public static String GetMachinePolPath() #StringGets the path to the machine Registry.pol file.
public static String GetNonAdministratorsCommentPath() #StringGets the path to the comment.cmtx for built-in Non-Administrators (MLGPO).
public static String GetNonAdministratorsPolicyCommentPath() #StringGets the path to the policyComments.cmtx for built-in Non-Administrators (MLGPO).
public static String GetNonAdministratorsPolPath() #StringGets the path to the per-user Registry.pol for the built-in Non-Administrators (MLGPO).
public static String GetPerUserCommentPath(String sid) #StringGets the path to a per-user comment.cmtx file for a given sid.
Parameters
- sid System.String
- Account SID (e.g., S-1-5-21-...-1001).
public static String GetPerUserPolicyCommentPath(String sid) #StringGets the path to a per-user policyComments.cmtx file for a given sid.
Parameters
- sid System.String
- Account SID (e.g., S-1-5-21-...-1001).
public static String GetPerUserPolPath(String sid) #StringGets the path to a per-user Registry.pol file for a given sid.
Parameters
- sid System.String
- Account SID (e.g., S-1-5-21-...-1001).
public static String GetUserCommentPath() #StringGets the path to the user comment.cmtx file.
public static String GetUserPolicyCommentPath() #StringGets the path to the user policyComments.cmtx file.
public static String GetWindowsRoot() #StringGets the Windows root directory (e.g., C:\Windows) with fallbacks for older frameworks.
public static String TryGetSid(String account) #StringTranslates an account name (DOMAIN\User) to SID string, or null if not found.
Parameters
- account System.String
- Account name in NT format or local name.
Returns
SID string when resolved; otherwise null.