Answers for "how to get administrative permissions python windows"

-1

python is running as administrator

import ctypes, os
 
def isAdmin():
	""" Return True/Flase """
    try:
        is_admin = (os.getuid() == 0)	# if Unis
    except AttributeError:
        is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0	# elese if Windows
    return is_admin
Posted by: Guest on August-01-2020

Code answers related to "how to get administrative permissions python windows"

Python Answers by Framework

Browse Popular Code Answers by Language