Problem
When I run the program, I have sfc / scannow triggered and the progress bar does not appear, but only the program freezes until sfc scannow finishes its work.
Image - https://i.stack.imgur.com/Ei24y.jpg
I tried to change their places, but does not work
Function sfcScannow
def sfcScannow(event):
sfcWindow = Toplevel()
sfcWindow.title("Сканирование системы")
sfcWindow.minsize(350,480)
sfcWindow.maxsize(350,480)
sfcWindow['bg'] = '#fff2fe'
pb = ttk.Progressbar(sfcWindow, length=300, mode ="indeterminate")
msg = Label(sfcWindow, width=30, height=4, fg="#691962", relief="ridge", font="Intro 15", text="Начато сканирование")
msg2 = Label(sfcWindow, width=30, height=3, fg="#691962", relief="ridge", font="Intro 13", text="About UsefulTech.")
msg3 = Button(sfcWindow, width=30, height=3, fg="#691962", relief="ridge", font="Intro 16", text="Информация")
def InformSFC(event):
mb.askyesno(title="Информация", message="Данная функция отвечает за проверку системных файлов, используя функцию Windows 'sfc /scannow'. Процесс может занимать более 20 минут и шкала процесса, не точно расчитана. Лучше ждать > 30 минут")
msg3.bind("<Button-1>", InformSFC)
msg.pack()
msg2.pack()
msg3.pack()
pb.pack(side="bottom")
pb.start()
os.system("sfc /scannow")
During the test, the progressbar should work, and after the test is completed, it should stop