[python-win32] Check if user has windows administrator

Mark Hammond mhammond at skippinet.com.au
Tue Jan 15 03:39:08 CET 2008


> Follow-up question.
> 
> Why does type-ahead in PythonWin not show more functions after
> ctypes.windll. ?
> 
> Is this because of late-binding???

pythonwin basically just does a dir() of the name and the class, with
special support for COM objects.  See _AutoComplete() in
pywin/scintilla/view.py - I'd be happy to accept patches which made it work
better with ctypes.

> import ctypes
> print ctypes.windll.shell32.IsUserAnAdmin()

And my followup is that pywin32-211 will have shell.IsUserAnAdmin() - but
I'm still trying to work out how to build Roger's win32security changes
which relate to Vista's UAC with the older compilers we need to support :(
Oh - and also how to either (a) force bdist_wininst executables to request
elevation or (b) have the .msi generation be smarter wrt upgrading so
installation is reasonable on Vista.  Does anyone here have bdist_msi
experience?

Mark



More information about the python-win32 mailing list