Under XP I used the following code
AppDomain.Curre ntDomain.SetPri ncipalPolicy(Se curity.Principa l.PrincipalPoli cy.WindowsPrinc ipal)
Dim MyPrincipal As
System.Security .Principal.Wind owsPrincipal =
CType(System.Th reading.Thread. CurrentPrincipa l,
System.Security .Principal.Wind owsPrincipal)
bgIsAdministrat or =
MyPrincipal.IsI nRole(System.Se curity.Principa l.WindowsBuiltI nRole.Administr ator)
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.Curre ntDomain.SetPri ncipalPolicy(Se curity.Principa l.PrincipalPoli cy.WindowsPrinc ipal)
Dim MyPrincipal As
System.Security .Principal.Wind owsPrincipal =
CType(System.Th reading.Thread. CurrentPrincipa l,
System.Security .Principal.Wind owsPrincipal)
bgIsAdministrat or =
MyPrincipal.IsI nRole(System.Se curity.Principa l.WindowsBuiltI nRole.Administr ator)
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
Comment