我用VB制作一个安装程序
需要将被安装的程序的快捷方式放到桌面上去
请问如何做到呢?
请帮我一把,谢谢了!

解决方案 »

  1.   

    引用:Windows Script Host ...'创建快捷方式
    Public Sub CreateShortCutOnDeskTop(ByVal Name As String, ByVal Description As String, TargetPath As String, WorkingDirectory As String)
    Dim X As New IWshRuntimeLibrary.IWshShell_Class
    Dim Y As IWshRuntimeLibrary.IWshShortcut_Class
    'Attribute VB_Name = "ShortCut"
        Set Y = X.CreateShortcut(X.SpecialFolders.item("AllUsersDesktop") & "\" & Name & ".lnk")
        Y.TargetPath = TargetPath
        Y.Description = Description
        Y.WorkingDirectory = WorkingDirectory
        Y.Save
    End Sub
      

  2.   

    用Setup Factory 打包,一句代码都不用,只要将"在桌面建立快捷方式"这个项打上勾就可以了
      

  3.   

    使用windows的脚本对象----------wscript.shell
    有创建快捷方式的属性和方法。