I compiled a .py file into .exe via pip, everything compiled without errors, but when I open the file, the console opens and immediately closes. It was advised to write input () at the end, but this did not help. The program itself in .py format works fine. Here is the code:
import time import os import winreg # Добавить в автозагрузку key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, winreg.KEY_ALL_ACCESS) winreg.SetValueEx(key, "Cheat", 0, winreg.REG_SZ,"%USERPROFILE%\\Programs\\Cheat\\cheat.exe") key.Close() # Удалить из авто загрузки # key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",0, winreg.KEY_ALL_ACCESS) # winreg.DeleteValue(key, "Date Time") # key.Close() while True: os.startfile(r'r.png') time.sleep(4) input()