使用 VBScript 在快捷方式中更改目标 [英] Changing Target in Shortcut with VBScript
本文介绍了使用 VBScript 在快捷方式中更改目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个 VBScript 来更改链接中的目标
I am trying to create a VBScript to change a target in a link
当前目标是
"C:\Program Files\Hyland\Application Enabler\AEClient.exe"
我希望新目标是
"C:\Program Files\Hyland\Application Enabler\AEClient.exe" \\rrscwpappimg02\Workflow\CWF\AppEnabler\CombinedCWF.xml
这是我迄今为止的脚本.我在第 4 行字符 78 上不断收到错误消息:
Here is the script I have thus far. I keep getting an error on line 4 char 78:
Set wsc = WScript.CreateObject("WScript.Shell")
Set lnk = wsc.CreateShortcut(wsc.SpecialFolders("desktop") & "\AE Client.LNK")
lnk.targetpath = "C:\Program Files\Hyland\Application Enabler\AEClient.exe" \\rrscwpappimg02\Workflow\CWF\AppEnabler\CombinedCWF.xml
lnk.description = "AE Client"
lnk.workingdirectory = "C:\Program Files (x86)\Hyland\Application Enabler\"
lnk.save`
任何帮助将不胜感激.
即使只是一个脚本来创建在桌面上工作的快捷方式也能工作.
Even just a script to create the shortcut that work on the desktop would work.
推荐答案
这里是您问题的完整解决方案:
Here is the complete solution for your problem :
Set wsc = WScript.CreateObject("WScript.Shell")
Set lnk = wsc.CreateShortcut(wsc.SpecialFolders("desktop") & "\AE Client.LNK")
lnk.targetpath = "C:\Program Files\Hyland\Application Enabler\AEClient.exe"
lnk.Arguments = "\\rrscwpappimg02\Workflow\CWF\AppEnabler\CombinedCWF.xml"
lnk.save
这篇关于使用 VBScript 在快捷方式中更改目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文