I need to passively install Python in my applications package installation so i use the following:
python-3.5.4-amd64.exe /passive PrependPath=1
according this: 3.1.4. Installing Without UI I use the PrependPath parameter which should add paths into Path in Windows environment variables.
But it seems not to work. The variables does not take any changes.
If i start installation manually and select or deselect checkbox with add into Paths then everything works.
Works same with clear installation also on modify current installation. Unfortunately i do not have other PC with Win 10 Pro to test it.
I have also tried it with Python 3.6.3 with same results.
EDIT:
Also tried with PowerShell Start-Process python-3.5.4-amd64.exe -ArgumentList /passive , PretendPath=1
with same results.
Also tested on several PCs with Windows 10, same results, so the problem is not just on single PC
EDIT: Of cource all attempts were run as administrator.
To answer Erik Šťastný comment i believe that a good solution to your problem is to package python with your program to make sure that all the required libaries is preinstalled.
try powershell to do that
Ok, from my point of view it seems to be bug in Python Installer and I can not find any way how to make it works.
I have founds the following workaround:
Use py.exe which is wrapper for all version of Python on local machine located in C:\Windows so you can run it directly from CMD anywhere thanks to C:\Windows is standard content of Path variable.
This gives me directory of python 3.5 installation.
And then i set it into Path manually by:
Make sure you are using an elevated command prompt (ie: run as administrator).