def resolve_shortcut(filename):
    """resolve_shortcut("Notepad.lnk") => "C:\WINDOWS\system32\notepad.exe"
    
    Returns the path refered to by a windows shortcut (.lnk) file.
    """
    
    shell_link = pythoncom.CoCreateInstance(
        shell.CLSID_ShellLink, None,
        pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink)
    
    persistant_file = shell_link.QueryInterface(pythoncom.IID_IPersistFile)
    
    persistant_file.Load(filename)
    
    shell_link.Resolve(0, 0)
    linked_to_file = shell_link.GetPath(shell.SLGP_UNCPRIORITY)[0]
    return linked_to_file
resolve_shortcut("Notepad.lnk") => "C:\WINDOWS\system32
otepad.exe"
    
    Returns the path refered to by a windows shortcut (.lnk) file.
    
recipes/Python/496692_Windows_shortcuts_import_hook/recipe-496692.py