import os
import cv2
from gui_automation import GuiAuto
import time

# Where's the nvdptestutil?
DEFAULT_NVDP_PATH = r'C:\NvDpTestUtility\x64\Release_Customer\NvDpTestUtil.exe'

def run_as_admin(path_to_exe: str):
    # Note that the innermost string containing just the path to the 
    # excecutable needs to have backslashed quotes.
    # This is because os.system runs in command prompt, which escapes 
    # with backslashes, and because if you didn't escape it would end 
    # the argument (the one starting with "& {" ) sent to the 
    # Powershell -Command too early
    os.system(r'Powershell -Command "& { Start-Process \"'
     + path_to_exe 
     + r'\" -Verb RunAs }"')

if __name__ == '__main__':
    run_as_admin(DEFAULT_NVDP_PATH)

    # find the DSC tab and switch to it
    