Python Forum

Full Version: Adding into Path var while silent installation of Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to passively install Python in my applications package installation so i use the following:

Quote:python-3.5.4-amd64.exe /passive PrependPath=1

according this: https://docs.python.org/3.6/using/window...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.
Would you elaborate on why you need to install python silently? There are plenty of alternatives to freeze your code, incl. Python interpreter and external dependencies.
(Nov-20-2017, 10:37 AM)buran Wrote: [ -> ]Would you elaborate on why you need to install python silently? There are plenty of alternatives to freeze your code, incl. Python interpreter and external dependencies.

Python is part of bigger installation package.

Options /quiet or /passive in installer are exactly what i need.
do you run it from elevated command prompt?
(Nov-20-2017, 11:55 AM)buran Wrote: [ -> ]do you run it from elevated command prompt?

What do you mean by elevated? You mean with admin rights? I am using NSIS installer which runs python installer with admin rights.

But the same problem happens even with simple Command prompt so the NSIS is not issue.
(Nov-20-2017, 12:15 PM)Erik Wrote: [ -> ]What do you mean by elevated? You mean with admin rights?
yes, that was what I meant
Have you tried:  python-3.5.4.exe /passive InstallAllUsers=1 PrependPath=1
(Nov-20-2017, 02:33 PM)sparkz_alot Wrote: [ -> ]Have you tried:  python-3.5.4.exe /passive InstallAllUsers=1 PrependPath=1

I can not use InstallAllUsers=1 flag because in cases where user has already Installed Python on local User profile then is installation aborted without any changes.

(Nov-20-2017, 04:16 PM)Erik Wrote: [ -> ]
(Nov-20-2017, 02:33 PM)sparkz_alot Wrote: [ -> ]Have you tried:  python-3.5.4.exe /passive InstallAllUsers=1 PrependPath=1

I can not use InstallAllUsers=1 flag because in cases where user has already Installed Python on local User profile then is installation aborted without any changes.

I have test it but there is no effect work same like without InstallAllUsers=1. With flag is Python path inserted into system variables instead of user variables but only by manual. Still not work in /passive mod