Non-interactive installation of an additional Python environment on a computer which already has Python installed
I'm working on a deployment tool which will build a python environment with a number of dependancies pre-installed. According to the documentation on Python's web-site I should be able to do something like this:
msiexec.exe /i python_installer\开发者_运维百科python-2.4.4.msi TARGETDIR=c:\temp\install\fooX
However in the case where that version of Python is already installed on the system (in the regular C:\Python24 location) this command-line will attempt to repair the existing installation. It will not create a new installation in the TARGETDIR.
Does anybody know of additional command-line arguments which will help me achieve the following:
- I want the installation to block until the installation is complete. That way I can start the next process of my environment build once the current process has ended.
- I want the installation to always install to the TARGETDIR regardless of whether a valid Python installation exists elsewhere.
FYI, I'm using Python 2.4.4 on Windows XP 32bit.
UPDATE1: We have a solution to the "awlays installing problem", I just need a way to make the program block until completed. If I do /qn the process spawns a background process and terminates immediatly. I've always wondered why so many Windows tools work this way - it makes command line scripting impossible!
You could try the /a
instead of /i
flag:
From msiexec help:
/a <Product.msi>
Administrative install - Installs a product on the network
Another option to consider is /qn
:
/q[n|b|r|f]
Sets user interface level
n - No UI
You can get to the help window of msiexec by executing only msiexec
without parameters.
精彩评论