日期:2012-11-30  浏览次数:20929 次

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 对象

----------------------
这是微软自带的东东,或许有的朋友没有发现,贴出来共享一下吧。