add python file to registry window part run by python automatic

  python, python-3.x, registry

I want to add my program to registry automatic when user open program , i found some video and used a module "rayanoos" but dose not working

My code:

import rayanoos
import sys
tool = rayanoos.tools()
tool.reg_add_to_startup("win" , sys.argv[0] )

and erorr:

Traceback (most recent call last):
  File "e:codelockmain.py", line 3, in <module>
    tool = rayanoos.tools()
  File "C:Users332668AppDataLocalProgramsPythonPython39libsite-packagesrayanoos.py", line 32, in __init__
    self.__dll = CDLL('C:ProgramDatarns.rx')
  File "C:Users332668AppDataLocalProgramsPythonPython39libctypes__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

what should i do to improve my bug !!

Source: Python-3x Questions

LEAVE A COMMENT