A
A
Arthur Karimullin2020-06-19 16:51:07
Python
Arthur Karimullin, 2020-06-19 16:51:07

Autoload python script using script?

There is a script translated into an exe'shnik, you need to throw it into auto-load (Windows) using the script in the code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
irdaxirdaxirdax, 2020-06-28
@PiLoT13

from winreg import *
# Путь в реестре
key_my = OpenKey(HKEY_CURRENT_USER, 
                 r'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 
                 0, KEY_ALL_ACCESS)

# Установить скрипт в автозагрузку
SetValueEx(key_my, 'script', 0, REG_SZ, r'<путь к скрипту>')
# Закрыть реестр
CloseKey(key_my)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question