Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Security.Principal
- Dim identity = WindowsIdentity.GetCurrent()
- Dim principal = New WindowsPrincipal(identity)
- Dim isElevated As Boolean = principal.IsInRole(WindowsBuiltInRole.Administrator)
- If isElevated Then
- Me.Text = ("Navigation Main (Admin)")
- Form1Name.Text = Me.Text
- Admin_Enabled = True
- Else
- Admin_Enabled = False
- Me.Text = ("Navigation Main (Standard)")
- Form1Name.Text = Me.Text
- Label73.Visible = True
- End If
- youtube.com/kshadow22
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement