我正在使用以下脚本创建快捷方式:
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" & """"
如有疑问,请阅读文档。
From TargetPath属性-“备注”部分
此属性仅用于快捷方式的目标路径。快捷方式的任何参数都必须放在Argument的属性中。
命令的参数属于Arguments
属性:
Set oShellLink = objShell.CreateShortcut("shortcut.lnk")
oShellLink.TargetPath = "C:\Windows\System32\mshta.exe"
oShellLink.Arguments = "D:\path\to\file.hta"
...
oShellLink.Save
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句