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
___
python-win32 mailing list
python-win32@python.org
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.
It kinda works on Vista. If you're running from an elevated console then it
will return 1, othervise (even
14, 2008 1:55 PM
To: python-win32@python.org
Subject: [python-win32] Check if user has windows administrator
privilege
Hi,
Does anyone know if there's a way to programmatically check to
see if a user has windows administrator privilege? I