Why is my program not recognizing the file location? (Python 3.x)

  exe, python-3.x

I’ve been working on a terminal-based program, and I’ve been trying to get some installers and program runners to work. Essentially, I want to make it so that if you enter run.benchmark or install.process_hacker (Or some other command relegating to installs or running exterior .EXE files) it’ll either A) Run said program OR B) Run an installer .EXE file

I’ve been using the os.system function to run the programs, but when I make the program a .EXE file using PyInstaller, and I run the Command, it doesn’t recognize the location of the .EXE file.
Here’s the code that calls the .EXE file (And yes, OS is imported.):

    elif(mti == "install.process_hacker"):  # Checks whether the 'in_PH' Command needs to be run
        os.system(r"resourcesbundlesprocesshacker-2.39-setup.exe")

And when I call this, I get a message similar to this:
File Cannot Be Found.
It’s going to be installed onto the user’s PC, so where would the file location be? Because the relative file location obviously isn’t working.

Source: Python-3x Questions

LEAVE A COMMENT