filepath=r'C:\Users\xxxxx\Downloads\7z1900-x64.msi'
command=r'/quiet'
import os
import ctypes
from subprocess import PIPE, Popen
try:
    if os.path.exists(filepath):
        ec='%s %s'%(filepath,command)
        print ec
        OBJ = Popen(ec, shell = True, stdout = PIPE, stderr = PIPE)
        out, err = OBJ.communicate()
        RET = OBJ.returncode
        if RET == 0:
            print "Application is installed"
        else:
            print "Application is not installed"

    else:
        print "Please check the path"
        
except Exception as err :
    print err
