from winreg import * # Путь в реестре key_my = OpenKey(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\\CurrentVersion\Run') # Установить программу "notepad" в автозагрузку SetValueEx(key_my, 'mynotepad', 0, REG_SZ, 'C:\\Windows\\System32\\notepad.exe') # Закрыть реестр CloseKey(key_my) I run this script in cmd from the Administrator, but it gives me
PermissionError: [WinError 5] Access is denied.
How do I remove this restriction?