From 91044dd5543a21efe4e8cfc555046028725403b2 Mon Sep 17 00:00:00 2001 From: KoDi <54508732+kodiprogdis@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:02:17 +0300 Subject: [PATCH] Update main.py --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 38688d0..c90a448 100644 --- a/main.py +++ b/main.py @@ -61,8 +61,8 @@ class Nasa(Config): if self.state is False: print("Автозапуск включен.") path = os.path.dirname(os.path.realpath(__file__)) - address = os.path.join(path, "main.exe") - key_value = "Software/Microsoft/Windows/CurrentVersion/Run" + address = os.path.join(path, "start.bat") + key_value = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" user = getpass.getuser() key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS) reg.SetValueEx(key, user, 0, reg.REG_SZ, address) @@ -79,7 +79,7 @@ class Nasa(Config): icon_path=self.resource_path("nasa.ico")) else: print("Программа удалена из автозапуска.") - key_value = "Software/Microsoft/Windows/CurrentVersion/Run" + key_value = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" user = getpass.getuser() key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS) reg.DeleteValue(key, user)