如何使用 Python 更改快捷方式目标?

问题描述

我有 n 个快捷方式文件。例如。 n=10:
(1.lnk,... 到 10.lnk)

我尝试将目标更改为:
("C:\Program Files\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 1") ...直到配置文件 10

带有 ( " ) 的语法错误

import sys
import win32com.client
shell = win32com.client.dispatch("WScript.Shell")
shortcut = shell.createshortcut("C:\a\1.lnk")
shortcut.targetpath = ""C:\Program Files\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 6""
shortcut.save()

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)