From an earlier era of this site. Left here for the record.
Check whether the current user is an administrator
An extremely simple way to check whether the currently logged in user has administrative rights on the local machine;
Public Shared ReadOnly Property IsUserAdmin() As Boolean
Get
Return My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator)
End Get
End Property
This site uses a single essential cookie to remember your preference. Analytics are optional and only load if you accept. See the privacy policy for details.