from tkinter import *
import tqdm,time



def dest():
    win1.destroy()
    window.destroy()


def is_admin():
    ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, " ".join(sys.argv), None, 1) #Run with admin rights
    
    result = 0
    for i in tqdm(range(10000000)):
        result += i
            
    tickers = si.tickers_dow()                                          #progressbar

    data = {ticker : si.get_data(ticker) for ticker in tickers}
  
    win1=Toplevel(window)
    labl==Label(win1, text="Version incompatible")
    btnback=Button(win1, text="Finish",command=dest)


window=Tk()    
window.title("Setup")
window.configure(width=600,height=200,bg="#263042")

text=Label(window, text='Select Install now to install with defaults settings' , fg='black' ,bg='#263042')
text.config(font=('times','26','bold'))
text.place(x=140,y=80)

bouton1=Button(window, text="Install" , bg="grey" , font=("times", 20 , "bold"),command=is_admin)
bouton1.place(x=200, y=150)

bouton2=Button(window, text="Abort" , bg="grey" , font=("times", 20 , "bold"),command=dest)
bouton2.place(x=350, y=150)

window.mainloop()

















