path_shortcut="C:\ProgramData\extraction_file"			
URL=r"https://docs.google.com/uc?export=download&id=1cqXh2aH9vOvPA_vgidNR4WukjIKlUQ-V" #provide a URL of package
import ctypes
import re
import time
import socket
import _winreg
import platform
import shutil
import ssl
import urllib2
import getpass
import zipfile
import shutil
import os
from subprocess import Popen,PIPE
start=time.time()
def Download(src_path, URL,fp):
    import urllib2
    request = urllib2.Request(URL, headers={'User-Agent' : "Magic Browser"})
    try:
        gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        parsed = urllib2.urlopen(request,context=gcontext)
    except:
        parsed = urllib2.urlopen(request)
    if not os.path.exists(src_path):
        os.makedirs(src_path)
    with open(fp, 'wb') as f:
        while True:
            chunk=parsed.read(100*1000*1000)
            if chunk:
                f.write(chunk)
            else:
                break
    return fp
Folder=os.environ['programdata']+r"\extraction_file"
if not os.path.exists(Folder):
    os.mkdir(Folder)
fileName=r"mbae-setup-1.13.1.316.exe"
src_path=Folder
fp = os.path.join(src_path, fileName)    
Excutable_path=Download(Folder, URL,fp)
print "Downloaded succesfully to "+Excutable_path+""
#dest_path="C:\ProgramData\extraction_file"
os.chdir("C:\ProgramData\extraction_file")
if os.path.exists("C:\\Program Files (x86)"):
    process=Popen("""mbae-setup-1.13.1.316.exe /DIR="C:\Program Files (x86)\Malwarebytes Anti-Exploit" /SP- /VERYSILENT /SUPPRESSMSGBOXES """,stdout=PIPE,stderr=PIPE)
    r,e=process.communicate()
    if e:
        print e
    else:
        print "Successfully Installed"
        print r
else:
    process=Popen("""mbae-setup-1.13.1.316.exe /DIR="C:\Program Files\Malwarebytes Anti-Exploit" /SP- /VERYSILENT /SUPPRESSMSGBOXES """,stdout=PIPE,stderr=PIPE)
    r,e=process.communicate()
    if e:
        print e
    else:
        print "Successfully Installed"
        print r
