exes being locally present in the script folder rather just the code should do the job. My last option is to use the update.exe file teams uses to get the latest version but I don't want it to depend on any. My script works it reinstalls teams and displays a progress bar no errors in the program itself just want to better it for universal use. This is the snippet of code that downloads and displays a progress bar where url = "static link" i want to get a way to insert the latest links automatically.
I might not have explained it properly, but the request function uses a static link, is there no way I can rather query the download site for the latest version, I basically just need to ask the site for the latest version of teams to reinstall otherwise ill have to manually update the link as teams updates. If you are in Canada, like me, the complete line of Surface Hub products. The Surface Hub is priced at about USD9000 for the 55 version and 22000 for the 84 version. Print("ERROR: Something went wrong, check connection and try again, or see help.txt for more info") Windows Surface Hub is a 55 or 84 LCD touch screen with an integrated PC running Windows 10 Team that is used in corporate offices for collaboration and conferencing. If total_size_in_bytes != 0 and progress_bar.n != total_size_in_bytes: With open('c:/users/%s/downloads/Teams.exe' %Name, 'wb') as file:įor data in er_content(block_size): Progress_bar = tqdm(total=total_size_in_bytes, unit='iB', unit_scale=True)
Total_size_in_bytes= int(('content-length', 0)) Response = requests.get(url, stream=True) Print("installed, please close teams and rerun this program.") if os.path.exists("C:/Users/%s/AppData/Local/Microsoft/Teams" %Name): However I am making use of a static link at the moment and would like to know is there a way to query for the latest version so that when my request runs I can have an argument to ask for the latest version instead of relying on a static link that will have to be updated manually.Īny help would be appreciated. I would like to query MS teams download site for the latest version on python, I am automating MS teams to one click "repair", it reinstalls itself whence my program is run.