I am using the CheckTokenMembership Windows API to check if the user is an Administrator.
Here\'s the code:
Option Explicit Private Const SECURITY_B
Separate pvIsAdmin in a completely separate module and copy function declarations verbatim from the snippet. In AllocateAndInitializeSid lpPSid is ByRef. In FreeSid param is ByVal.
pvIsAdmin
AllocateAndInitializeSid
FreeSid