是不是用那个fCreateShellLink,网上有很多版本,说该函数在STKIT432.DLL或vb5stkit.dll,然而我搜索过系统这两个文件都没有(可能那些很久了)。  
还是有别的方法?高手指教一下。

解决方案 »

  1.   

    Windows 脚本宿主   CreateShortcut 方法
    创建新的快捷方式,或打开现有的快捷方式。object.CreateShortcut(strPathname) 
    参数
    object 
    WshShell 对象。 
    strPathname 
    表示要创建的快捷方式的路径名的字符串值。 
    说明
    CreateShortcut 方法返回 WshShortcut 对象或 WshURLShortcut 对象。只调用 CreateShortcut 方法并不会导致快捷方式的创建。快捷方式对象以及对其所做的更改存储在内存中,直到您用 Save 方法将其保存到磁盘中为止。要创建快捷方式,必须执行以下操作: 创建 WshShortcut 对象的实例。 
    初始化它的属性。 
    用 Save 方法将其保存到磁盘中。 
    注意   一个常见的问题是,将参数放在快捷方式对象的 TargetPath 属性中将不起作用。快捷方式的所有参数都必须放在 Arguments 属性中。
    示例
    下面的示例创建 WshShell 对象并使用 CreateShortcut 方法创建两个快捷方式。         set WshShell = WScript.CreateObject("WScript.Shell")
             strDesktop = WshShell.SpecialFolders("Desktop")
             set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut Script.lnk")
             oShellLink.TargetPath = WScript.ScriptFullName
             oShellLink.WindowStyle = 1
             oShellLink.Hotkey = "CTRL+SHIFT+F"
             oShellLink.IconLocation = "notepad.exe, 0"
             oShellLink.Description = "Shortcut Script"
             oShellLink.WorkingDirectory = strDesktop
             oShellLink.Save
             set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Microsoft Web Site.url")
             oUrlLink.TargetPath = "http://www.microsoft.com/china"
             oUrlLink.Save
      

  2.   

    很复杂的呢,可不可以调用API函数?
      

  3.   

    唉,楼上的,你是不是太自信了,都不可以,第一行就出错了WIN2003