The Learner
The Learner

Reputation: 265

Is it possible to install an msi using python?

Is it possible to write a script in python that installs an msi? Or is it possible to make it through any other script?

Upvotes: 5

Views: 3120

Answers (2)

Helen
Helen

Reputation: 97540

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

Upvotes: 0

Alex Martelli
Alex Martelli

Reputation: 881487

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).

Upvotes: 7

Related Questions