I created a very simple batch file as a launcher for a python script, however it does not work fine depending on the "PATH" setup for the user (Python 2 x Python 3).
Since changing the PATH can bring issues with other Python 2 based applications , could I make any update in the .bat to make a temporary change in the PATH while the Py script is running?
The idea is to use the batch to have the minimum interference from the user in the system setup (preferable a double click only).
In case of yes, what could I do?
@echo off
title ###Beta Script Launcher###
python myscript.py
pause
%PATH%variable with thesetcommand, the changed value will only be valid in the currentcmdprocess and its children that are executed after the change. Independently created processes will still have the original value.setxworks the other way: it changes the value for any independently started processes in the future.set path "%path%;C:\Users\user\Programs\Python\Python37-32"prior calling for python in my .bat, but the output was the list of the PATH Env. variables currently listed and the message that the address I tried to add is not defined.setandsetxhave different syntax (yes, very confusing). Seeset /?andsetx /?