赞
踩
from win32com.client import Dispatch
path = r"D:\mojoy.lnk" # Path to be saved (shortcut)
target = r"D:\video_frame\mojoy\mojoy.exe" # The shortcut target file or folder
work_dir = r"D:\video_frame\mojoy" # The parent folder of your file
shell = Dispatch('WScript.Shell')
shortcut = shell.CreateShortCut(path)
shortcut.Targetpath = target
shortcut.WorkingDirectory = work_dir
shortcut.save()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。