I am unable to make the System Environment Variable Path work. I see no error/typo in the paths and they are exact matches, but the system is still unable to find the files I want to run. When I add a pause to my Batch file I am able to see the following error in the command prompt: "[Errno 2] No such file or directory".
I am trying to use a batch file (i.e. magic8ball.bat) to run a python script (i.e. magic8ball.py) by just typing in "magic8ball" in the Win + R prompt. I will include pictures of the file paths, the batch file contents, what I type into the run prompt, and the system environment variables.
The Path environment variable also doesn't work when I try to use Selenium's webdriver in another python script without manually specifying the exact path. You can see the exact webdriver path in the env variables, but doing "driver=webdriver.Chrome()" doesn't work. It only works if I manually declare the path with like "driver=webdriver.Chrome(executable_path=r'C:\webdriver\chrome\chromedriver.exe')".
Going back to the batch file, running it from the run prompt fails to find the batch file and clicking on the file manually fails to find the python file. Manually clicking on the batch file is what throws the error "[Errno 2] No such file or directory".
This works flawlessly on my old Windows 10 laptop that has the exact same paths and files, but I can't get it to work on my new Windows 11 laptop. I see no error/typo in the paths and have confirmed they are exact matches to where the files live. What am I missing or doing wrong?