ASP之在服务器端创建快捷方式二之例子。

80酷酷网    80kuku.com

  创建|服务器|快捷方式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 对象

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

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: