function IsAdministrator: BOOL; stdcall; // Determines whether the current user is part of the Administrator's group var bAdmin: BOOL; begin bAdmin := IsAdministrator(); ShowMessage(Format('Current User is Admin: %s', [BoolToStr(bAdmin, True)])); end;