2017-01-23 103 views

回答

0

根據Using Windows Installer - Non-interactive installation

使用命令行

msiexec /i python<version>.msi 

安裝可通過編程方式啓動。附加參數 可以在該命令行的末尾被傳遞,如

msiexec /i python-2.5.msi TARGETDIR=r:\python25 

...

目標目錄

屬性TARGETDIR確定的Python 安裝的根目錄下。例如,不同的安裝驅動器能與

TARGETDIR=R:\python25 

默認TARGETDIR[WindowsVolume]Python<version>指定 。

所以,你可以這樣做:

msiexec /i python-2.7.x.msi TARGETDIR=c:\other\place\to\install 
+0

非常感謝。這樣可行。我如何指定相對於Windows卷的路徑?目前,我對它進行了硬編碼(C:\ myfolder)。 –

相關問題