在XP下怎么用VB运行快捷方式呀,我今天才发现在XP下运行快捷方式时会先跳出一个窗口然后才运行程序身呀 

解决方案 »

  1.   

    应该是先得到快捷方式目标 然后shell
    http://community.csdn.net/Expert/TopicView.asp?id=3156956
    http://community.csdn.net/Expert/topic/2949/2949080.xml?temp=.1713678
    http://community.csdn.net/Expert/TopicView.asp?id=3153929
      

  2.   

    来个简单点的~
    xp下面和其他操作系统不同  网上关于执行快捷方式方法很多   包括上面我给出的几个连接
    xp下面都运行不过下面的   winxp sp1 +vb6sp6通过测试Option ExplicitPrivate Sub Command1_Click()
        Shell GetTargetPath("C:\Documents and Settings\bafony\桌面\RealOne.lnk")
    End SubFunction GetTargetPath(ByVal FileName As String)Dim Obj As Object
    Set Obj = CreateObject("WScript.Shell")Dim Shortcut As Object
    Set Shortcut = Obj.CreateShortcut(FileName)
    GetTargetPath = Shortcut.TargetPath
    Shortcut.SaveEnd Function