I want to check if a python script is running with admin permissions on windows, without using the ctypes module. It is important for me not to use ctypes for some reasons.
I have looked with no luck.
Thanks.
If you install the pywin tool set, the function win32.shell.IsUserAnAdmin() can be used to see if you a a member of the administrators group.
How to know if a python script is running with admin permissions in windows?