Here\'s my code:
import win32com.client import os import ctypes, sys def is_admin(): try: return ctypes.windll.shell32.IsUserAnAdmin() except: