VBS创建快捷方式加参数代码

set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop") '获取桌面路径
set oShellLink = WshShell.CreateShortcut(strDesktop & "\酒店 主页.lnk")   '快捷方式将要保存到的完全路径
oShellLink.TargetPath = "D:\My_Data\360Chrome\Application\360chromex.exe"   '指向的可执行文件
oShellLink.Arguments = "http://dnbdjd/"    '“目标”的运行参数,无参数时,直接=""
oShellLink.WindowStyle = 1   '快捷方式里的“运行方式”
oShellLink.IconLocation = "D:\My_Data\360Chrome\favicon.ico, 0"   '快捷方式的图标
oShellLink.Description = "酒店 主页"   '快捷方式里的“备注”
oShellLink.WorkingDirectory = "D:\My_Data\360Chrome\Application"   '快捷方式里的“起始位置”
oShellLink.Save '使用以上的设置创建快捷方式

 

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享