3

Is there any python script to install a msi? I need to install msi and run it without showing any dialogue modal. I have msi on my folder c:\user\documents and i have a wxpython GUI developed using python script.I need to silent install msi and run the exe from the GUI.

1
  • 2
    I think this one would be better suited on SO. Commented Jan 25, 2013 at 7:12

2 Answers 2

9

simple use. No transforms provided, and code is non-blocking:

import os
os.system('msiexec /i %s /qn' % msi_location)

With transforms, and code is non-blocking:

import os
os.system('msiexec /i %s TRANSFORMS=%s /qn' % (msi_location, transforms_location)

With transforms, and code is blocking - so you know when it has completed:

import subprocess
subprocess.call('msiexec /i %s TRANSFORMS=%s /qn' % (msi_location, transforms_location), shell=True)

For more info on TRANSFORMS: https://msdn.microsoft.com/en-us/library/aa367447%28v=vs.85%29.aspx

0
2

This is not really a python question, and it depends if your specific MSI package allow unattended installation. See this SO article

detect msi parameters for unattended install

how to find out about the parameters of an MSI package. Then, try the unattended installation manually using the windows command shell, calling msiexec. See here

http://technet.microsoft.com/en-us/library/cc759262%28v=ws.10%29.aspx

for more information.

Finally, all you need to do in python is to use os.system to call msiexec with the name of the package and the correct parameters.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.