January 1, 2005

WinTask - IsNTAdmin

'
' IsNTAdmin - Checks whether the current user is a member of the Administrator group.
'
' Author: Joe Strazzere
'

Function IsNTAdmin()
 IsNTAdmin = External("advpack.dll","IsNTAdmin",0,0)
EndFunction
If IsNTAdmin() <> 0 then
  msgbox("Yes. The current user is an Admin for this machine.")
else
  msgbox("No. The current user is not an Admin for this machine.")
endif