J
Jack Russell
Under XP I used the following code
AppDomain.CurrentDomain.SetPrincipalPolicy(Security.Principal.PrincipalPolicy.WindowsPrincipal)
Dim MyPrincipal As
System.Security.Principal.WindowsPrincipal =
CType(System.Threading.Thread.CurrentPrincipal,
System.Security.Principal.WindowsPrincipal)
bgIsAdministrator =
MyPrincipal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)
However under Vista this returns false unless the program is
specifically run as an administrator.
I am not interested in that but in the account type (Administrator or
standard). How can I find that out please?
Thanks
Jack Russell
AppDomain.CurrentDomain.SetPrincipalPolicy(Security.Principal.PrincipalPolicy.WindowsPrincipal)
Dim MyPrincipal As
System.Security.Principal.WindowsPrincipal =
CType(System.Threading.Thread.CurrentPrincipal,
System.Security.Principal.WindowsPrincipal)
bgIsAdministrator =
MyPrincipal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)
However under Vista this returns false unless the program is
specifically run as an administrator.
I am not interested in that but in the account type (Administrator or
standard). How can I find that out please?
Thanks
Jack Russell