Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can try like this
import os
from win32com.client import Dispatch
path = os.path.join("Путь, куда сохранять", "Name.lnk")
target = r"Полный путь к файлу"
wDir = r"Путь к папке с файлом"
icon = r"Путь к иконке с файлом (Можно к .exe)"
shell = Dispatch('WScript.Shell')
shortcut = shell.CreateShortCut(path)
shortcut.Targetpath = target
shortcut.WorkingDirectory = wDir
shortcut.IconLocation = icon
shortcut.save()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question