vbscript实现 为文件夹创建快捷方式 lnk

来源:互联网 发布:扫码软件 编辑:程序博客网 时间:2024/05/18 13:28


'创建快捷方式
Dim deskTopPath,shell,link


Set shell = CreateObject("wscript.shell")
deskTopPath = shell.SpecialFolders("DeskTop")                              ' 获得桌面路径


Set link = shell.CreateShortcut(deskTopPath & "\test.lnk")
link.targetpath = "D:\yld的文件\开发\vbs\脚本之家"                                        ' 目标文件
link.description = "test script"  
link.HotKey = "CTRL+ALT+X"                                                                            ' 快捷键
link.IconLocation = "C:\WINDOWS\system32\imageres.dll,3"
link.windowstyle = 3
link.workingdirectory = "D:\yld的文件\开发\vbs\"                                            ' 目标文件所在的目录
link.save

Set link = Nothing 

Set shell = Nothing



0 0
原创粉丝点击