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
http://community.csdn.net/Expert/TopicView.asp?id=3156956
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