Skip to content

Python v3 Unattended / Silent Install w/XML

After upgrading windows 10 to v2004, python silent installed stopped functioning. I was able to use this silent install via the terminal rather than a xml file

python-3.8.5-amd64.exe /quiet InstallAllUsers=1 TargetDir=c:\Python38 AssociateFiles=1 CompileAll=1 PrependPath=0 Shortcuts=0 Include_doc=1 Include_debug=0 Include_dev=0 Include_exe=1 Include_launcher=1 InstallLauncherAllUsers=1 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=1 Include_test=1 Include_tools=1

I've had a hard time in getting PC windows 10 machines consistently installed the same version of Python3.8.0 with same results. After realizing that one could script the install process using the Python38*.exe file to silently install this version to many laptops. Silent Install aka Unattended Install is the best approach thusfar. There were no many examples i could find online but came up with this list of parameters where it worked for me. This will only install for the user of the machine instead of for all users.

<Options>
<Option Name="InstallAllUsers" Value="no" />
<Option Name="DefaultJustForMeTargetDir" Value="C:\Python38" />
<Option Name="DefaultCustomTargetDir" Value="C:\Python38" />
<Option Name="AssociateFiles" Value="yes" />
<Option Name="CompileAll" Value="yes" />
<Option Name="PrependPath" Value="no" />
<Option Name="Shortcuts" Value="yes" />
<Option Name="Include_doc" Value="yes" />
<Option Name="Include_debug" Value="no" />
<Option Name="Include_dev" Value="yes" />
<Option Name="Include_exe" Value="yes" />
<Option Name="Include_launcher" Value="no" />
<Option Name="InstallLauncherAllUsers" Value="no" />
<Option Name="Include_lib" Value="yes" />
<Option Name="Include_pip" Value="yes" />
<Option Name="Include_symbols" Value="no" />
<Option Name="Include_tcltk" Value="yes" />
<Option Name="Include_test" Value="yes" />
<Option Name="Include_tools" Value="yes" />
<Option Name="SimpleInstall" Value="yes" />
<Option Name="SimpleInstallDescription">Automatic Install</Option>
</Options>




Download Python3.8.0 from this link.
https://www.python.org/downloads/release/python-380/

save the above XML content to a text editor and named it: unattend.xml

Fire up a DOS PROMPT on window 10 and execute the following line:
c:\users\hobbit\python-3.8.0-amd64.exe /quiet c:\users\hobbit\unattend.xml

Of course, my user account on my personal windows 10 will be different from your windows environment. So.... Alter your environment as you see fit. Generally speaking, one could place both the exe file and the xml file inside download directory and fire up the DOS prompt from download dir and execute that particular command.

Happy Coding !

Leave a Reply

Your email address will not be published. Required fields are marked *