wshshell.createshortcut
createshortcut 方法创建 wshshortcut 对象并将其返回。如果快捷方式标题以 .url 结尾,就会创建 wshurlshortcut 对象。
语法
wshshell.createshortcut(strpathname) = objshortcut
示例
this code fragment creates a shortcut
to the currently executing script
set wshshell = wscript.createobject("wscript.shell")
set oshelllink = wshshell.createshortcut("current script.lnk")
oshelllink.targetpath = wscript.scriptfullname
oshelllink.save
set ourllink = wshshell.createshortcut("microsoft web site.url")
ourllink.targetpath = "http://www.microsoft.com"
ourllink.save
请参阅
wshshortcut 对象、wshurlshortcut 对象
———————-
这是微软自带的东东,或许有的朋友没有发现,贴出来共享一下吧。
