Older Version Newer Version

bshipps64 bshipps64 Feb 19, 2006 - "Edited description as per Alyce"

IsUserAnAdmin() function

Determines whether the currently logged on user is a member of the Administrator's group.


 isAdmin = IsUserAnAdmin() 
if not(isAdmin) then n$ = "not "
print "Current user is "; n$; "an administrator"
end

function IsUserAnAdmin()
calldll #shell32, "IsUserAnAdmin",_
IsUserAnAdmin as boolean
end function

Edited to add that the minimum OS for this API function is Windows 2000. It won't work on versions before that. - Alyce Alyce