poc.py
def create_shortcut(shortcut_name, target, arguments=None, shortcut_path=None, description=None, hotkey=HOTKEY):
    """
    Creating shortcut with given parameters.
    :param shortcut_name: Shortcut's name.
    :param target: Shortcut's target file.
    :param arguments: Arguments for the target file.
    :param shortcut_path: Where the shortcut will be created. Default is on the desktop.
    :param description: Shortcut description. Default is nothing.
    :param hotkey: Assign a key to the shortcut file. Default is the constant HOTKEY (defined above).
    """
    # Checking if the path exists and if not creating it. If there's no path choosing default.
    if shortcut_path:

        # Validation check.
        if isdir(shortcut_path):
            shortcut = winshell.shortcut(join(shortcut_path, shortcut_name))
        else:
            print("[!] It appears that the directory {} not exists!".format(shortcut_path))
            print("[+] Creating {}".format(shortcut_path))
            makedirs(shortcut_path)
            shortcut = winshell.shortcut(join(shortcut_path, shortcut_name))
    else:
        shortcut = winshell.shortcut(join(winshell.desktop(), shortcut_name))

    # Validation check and setting up target file.
    if isfile(target):
        shortcut.path = target
    else:
        print("[!] The file {} doesn't exists. Please run again this program with valid file.".format(target))
        return

    # Appending description if exists.
    if description:
        shortcut.description = description

    # Adding arguments if exists.
    if arguments:
        shortcut.arguments = arguments

    # Assigning hotkey.
    shortcut.hotkey = ord(hotkey.upper())

    # Creating the shortcut.
    shortcut.write()

    Creating shortcut with given parameters.
    :param shortcut_name: Shortcut's name.
    :param target: Shortcut's target file.
    :param arguments: Arguments for the target file.
    :param shortcut_path: Where the shortcut will be created. Default is on the desktop.
    :param description: Shortcut description. Default is nothing.
    :param hotkey: Assign a key to the shortcut file. Default is the constant HOTKEY (defined above).
    
Creating shortcut with given parameters.
Creating shortcut with given parameters .
def create_shortcut(shortcut_name, target, arguments=None, shortcut_path=None, description=None, hotkey=HOTKEY):
    if shortcut_path:
        if isdir(shortcut_path):
            shortcut = winshell.shortcut(join(shortcut_path, shortcut_name))
        else:
            print("[!] It appears that the directory {} not exists!".format(shortcut_path))
            print("[+] Creating {}".format(shortcut_path))
            makedirs(shortcut_path)
            shortcut = winshell.shortcut(join(shortcut_path, shortcut_name))
    else:
        shortcut = winshell.shortcut(join(winshell.desktop(), shortcut_name))
    if isfile(target):
        shortcut.path = target
    else:
        print("[!] The file {} doesn't exists. Please run again this program with valid file.".format(target))
        return
    if description:
        shortcut.description = description
    if arguments:
        shortcut.arguments = arguments
    shortcut.hotkey = ord(hotkey.upper())
    shortcut.write()
def create_shortcut ( shortcut_name , target , arguments = None , shortcut_path = None , description = None , hotkey = HOTKEY ) : if shortcut_path : if isdir ( shortcut_path ) : shortcut = winshell . shortcut ( join ( shortcut_path , shortcut_name ) ) else : print ( "[!] It appears that the directory {} not exists!" . format ( shortcut_path ) ) print ( "[+] Creating {}" . format ( shortcut_path ) ) makedirs ( shortcut_path ) shortcut = winshell . shortcut ( join ( shortcut_path , shortcut_name ) ) else : shortcut = winshell . shortcut ( join ( winshell . desktop ( ) , shortcut_name ) ) if isfile ( target ) : shortcut . path = target else : print ( "[!] The file {} doesn't exists. Please run again this program with valid file." . format ( target ) ) return if description : shortcut . description = description if arguments : shortcut . arguments = arguments shortcut . hotkey = ord ( hotkey . upper ( ) ) shortcut . write ( )
Creating shortcut with given parameters.
Creating shortcut with given parameters .
"""
    Creating shortcut with given parameters.
    :param shortcut_name: Shortcut's name.
    :param target: Shortcut's target file.
    :param arguments: Arguments for the target file.
    :param shortcut_path: Where the shortcut will be created. Default is on the desktop.
    :param description: Shortcut description. Default is nothing.
    :param hotkey: Assign a key to the shortcut file. Default is the constant HOTKEY (defined above).
    """ # Checking if the path exists and if not creating it. If there's no path choosing default.
 # Validation check.
 # Validation check and setting up target file.
 # Appending description if exists.
 # Adding arguments if exists.
 # Assigning hotkey.
 # Creating the shortcut.

shortcut_name
None
target
Shortcut's target file.
Shortcut ' s target file .
arguments
Arguments for the target file.
Arguments for the target file .
shortcut_path
None
description
Shortcut description. Default is nothing.
Shortcut description . Default is nothing .
hotkey
Assign a key to the shortcut file. Default is the constant HOTKEY (defined above).
Assign a key to the shortcut file . Default is the constant HOTKEY ( defined above ) .