gpt4 book ai didi

windows - 如何创建具有两个目标的快捷方式

转载 作者:可可西里 更新时间:2023-11-01 11:11:58 24 4
gpt4 key购买 nike

我正在使用以下脚本创建快捷方式:

Set oShellLink = objShell.CreateShortcut("shortcut.lnk")
oShellLink.TargetPath = "C:\Windows\System32\mshta.exe D:\path\to\file.hta"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "logo.ico"
oShellLink.Description = "app"
oShellLink.WorkingDirectory = desktop
oShellLink.Save

oShellLink.TargetPath = "C:\Windows\System32\mshta.exe D:\path\to\file.hta" 由于目标路径中有空格,它被卡住了。如何做到这一点?我也试过像这样操作字符串。

"C:\Windows\System32\mshta.exe" & " " & """" & "D:\PLR\software\plrplus.dll" & """"

最佳答案

如有疑问,请阅读 documentation .

From TargetPath property - Remarks Section
This property is for the shortcut's target path only. Any arguments to the shortcut must be placed in the Argument's property.

命令的参数属于 Arguments属性:

Set oShellLink = objShell.CreateShortcut("shortcut.lnk")
oShellLink.TargetPath = "C:\Windows\System32\mshta.exe"
oShellLink.Arguments = "D:\path\to\file.hta"
...
oShellLink.Save

关于windows - 如何创建具有两个目标的快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37179015/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com