Answers for "runfile as admin python"

-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 "runfile as admin python"

Python Answers by Framework

Browse Popular Code Answers by Language