|
|
||||||||||||||||
|
Installer FeaturesPython 2.4 is distributed as a Microsoft Installer (MSI) file on Windows. Typically, packages are installed by double-clicking them in the file explorer. However, with the msiexec.exe command line utility, additional features are available, like non-interactive installation and administrative installation.Non-interactive InstallationWith the command linemsiexec /i python<version>.msiinstallation can be initiated programmatically. Additional parameters can be passed at the end of this command line, like msiexec /i python-2.4.msi TARGETDIR=r:\python24 Limited user interfaceThe amount of user interface that installer displays can be controlled with /q options, in particular:
Target directoryThe property TARGETDIR determines the root directory of the Python installation. For example, a different installation drive can be specified withTARGETDIR=R:\python24The default TARGETDIR is [WindowsVolume]Python<version>. Due to a bug in python-2.4.msi, installing into a target dir that has a space in its name causes the IDLE and pydoc shortcuts to fail. Installation for All UsersAddingALLUSERS=1causes an installation for all users. By default, the non-interactive installation install the package just for the current user, and the interactive installation offers a dialog which defaults to "all users" if the user is sufficiently privileged. Feature SelectionA number of properties allow selection of features to be installed, reinstalled, or removed. The set of features for the Python installer is
With these options, adding ADDLOCAL=Extensionsinstalls the interpreter itself and registers the extensions, but does not install anything else. UninstallationWithmsiexec /x python<version>.msipython can be uninstalled. It is not necessary to have the MSI file available for uninstallation; alternatively, the package or product code can also be specified. You can find the product code by looking at the properties of the Uninstall shortcut that Python installs in the start menu. Administrative installationWithmsiexec /a python<version>.msian "administrative" (network) installation can be initiated. The files get unpacked into the target directory (which should be a network directory), but no other modification is made to the local system. In addition, another (smaller) msi file is generated in the target directory, which clients can then use to perform a local installation (future versions may also offer to keep some features on the network drive altogether). Currently, there is no user interface for administrative installations, so the target directory must be passed on the command line. There is no specific uninstall procedure for an administrative install - just delete the target directory if no client uses it anymore. AdvertisementWithmsiexec /jm python<version>.msiit would be possible, in principle, to "advertise" python to a machine (with /ju to a user). This would cause the icons to appear in the start menu, and the extensions to become registered, without the software actually being installed. The first usage of a feature would cause that feature to be installed. The Python installer currently supports just advertisement of start menu entries, but no advertisement of shortcuts. Automatic Installation on a Group of MachinesWith Windows Group Policy, it is possible to automatically install Python an a group of machines. To do so, perform the following steps:
|