开发者

Is it possible to install an msi using python?

开发者 https://www.devze.com 2023-01-05 02:52 出处:网络
Is it possible to write a script in python开发者_开发问答 that installs an msi? Or is it possible to make it through any other script?You can use the antiquated os.system(\'msiexec /i whatever.msi\')

Is it possible to write a script in python开发者_开发问答 that installs an msi? Or is it possible to make it through any other script?


You can use the antiquated os.system('msiexec /i whatever.msi'), or, better, the subprocess equivalent subprocess.call -- in either case, you can also add whatever further msiexec flags or arguments you desire (documentation in abundance here).


AFAIK, it's possible to use WMI in Python, so you should be able to install MSI files using the Win32_Product.Install method.

0

精彩评论

暂无评论...
验证码 换一张
取 消