mirror of
https://github.com/Starlio-app/Starlio-web.git
synced 2024-11-06 01:13:57 +03:00
Update main.py
This commit is contained in:
parent
c81efd4b04
commit
91044dd554
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -61,8 +61,8 @@ class Nasa(Config):
|
||||||
if self.state is False:
|
if self.state is False:
|
||||||
print("Автозапуск включен.")
|
print("Автозапуск включен.")
|
||||||
path = os.path.dirname(os.path.realpath(__file__))
|
path = os.path.dirname(os.path.realpath(__file__))
|
||||||
address = os.path.join(path, "main.exe")
|
address = os.path.join(path, "start.bat")
|
||||||
key_value = "Software/Microsoft/Windows/CurrentVersion/Run"
|
key_value = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
|
||||||
user = getpass.getuser()
|
user = getpass.getuser()
|
||||||
key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS)
|
key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS)
|
||||||
reg.SetValueEx(key, user, 0, reg.REG_SZ, address)
|
reg.SetValueEx(key, user, 0, reg.REG_SZ, address)
|
||||||
|
@ -79,7 +79,7 @@ class Nasa(Config):
|
||||||
icon_path=self.resource_path("nasa.ico"))
|
icon_path=self.resource_path("nasa.ico"))
|
||||||
else:
|
else:
|
||||||
print("Программа удалена из автозапуска.")
|
print("Программа удалена из автозапуска.")
|
||||||
key_value = "Software/Microsoft/Windows/CurrentVersion/Run"
|
key_value = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
|
||||||
user = getpass.getuser()
|
user = getpass.getuser()
|
||||||
key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS)
|
key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS)
|
||||||
reg.DeleteValue(key, user)
|
reg.DeleteValue(key, user)
|
||||||
|
|
Loading…
Reference in a new issue