in reply to How to determine if a user has administrator privileges in Windows environment

The Win32::NetAdmin module has the function GroupIsMember, which tells you if a username is a member of the group. I think you can use it as follows:

if GroupIsMember("", "Administrators", "") { print "The script is running with administrator privileges\n" } else { print "The script is running without administrator privileges\n" };