On Jan 14, 2008 8:55 PM, Patrick Li <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know if there's a way to programmatically check to see if a > user has windows administrator privilege? I need this to work in WinXP and > Vista. > > Thanks in advance, > Patrick > > > _______________________________________________ >
import ctypes print ctypes.windll.shell32.IsUserAnAdmin() (Courtesy of Thomas Heller - from a posting back in 2006) I have no idea if it will work on Vista. You will need to try it. hth, Graeme
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32