#To define a particular parameter, replace the 'parameterName' inside itsm.getParameter('parameterName') with that parameter's name
path_shortcut=itsm.getParameter("shortcutlocation")			#Provide shortcut location "C:\ProgramData\extraction_file"
URL=r"https://onedrive.live.com/download?cid=CFC812D5E983F253&resid=CFC812D5E983F253%21108&authkey=ADu9khsxaJxWzPM" #provide a URL of 32 bit 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
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"unknown"
src_path=Folder
fp = os.path.join(src_path, fileName)    
Excutable_path=Download(Folder, URL,fp)
print "Downloaded succesfully to "+Excutable_path+""

dest_path=os.environ['programdata']+r"\extraction_file\data"
os.makedirs(dest_path)
def filezip(Excutable_path,dest_path):
    with zipfile.ZipFile(Excutable_path,"r") as zip_ref:
        zip_ref.extractall(dest_path)
        print 'file unzipped to ' +dest_path 
filezip(Excutable_path,dest_path)

print "Creating Shortcut...."
location=os.environ['programdata']+r"\extraction_file"

folder_name=[x[1] for x in os.walk(location)][0][0]

new_location=os.environ['programdata']+r"\extraction_file"+"\\"+folder_name
z=[x[2] for x in os.walk(new_location)]

j='AccSoft.exe' 
res = [i for i in z[1] if j in i]
if res==[]:
    print("No Such EXE File exist")
    print("Failed")
else:
    print res[0]
    new_location=new_location+"\\"+res[0]
    if os.path.exists(path_shortcut):
        shorcutlocation=path_shortcut+'\\'+res[0]
        os.popen('MKlink  '+shorcutlocation+' '+new_location)
        print('Success')
    else:print("The given path doesn't exists : ".format(path_shortcut))