I have Python installed in:
C:\Python27\python.exe
I need to run Python script from batch file by setting environment variable that points to Python exe. Update: based on response here, i found that install directory in registry has:
HKLM\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath
with Name:Default and data: C:\Python27\
Now, runing the batch command like this:
for /f "tokens=*" %%A in ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath" /v Default') DO (
set CHESSPYTHONPATHv1=%%B)
Gives error:
The System was unable to find specified registry key or value.
Q1) what am i doing wrong?
Q2) This still requires version number to be known by manually looking into registry .
if batch file was to run on another PC, with different Python version, this would fail. How do i specify the registry search path which determines version installed too?
Thanks
sedy