0

如何为任何应用程序编写自动安装程序?假设我有 firefox 安装程序,所以我想运行我的 .py 文件,它会自动在我的计算机上安装 firefox。

4

2 回答 2

2

使用 python 自动安装 Firefox 你可以这样做:

import urllib, os
urllib.urlretrieve("https://download.mozilla.org/?product=firefox-17.0.1&os=win&lang=en-US", "Firefox.exe")
os.system("Firefox.exe /S")

你不必使用os.system,但你得到了一般的想法。有关静默安装 Firefox 的更多信息,请参见此处:https ://wiki.mozilla.org/Installer:Command_Line_Arguments

于 2012-12-11T15:06:50.590 回答
0

尝试pywinauto或通过win32com自动化AutoIT的 COM 服务器

于 2012-12-11T15:11:57.440 回答