Results 1 to 3 of 3

Thread: Retrieving Target-property from Shortcut (lnk)

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    1

    Unhappy Retrieving Target-property from Shortcut (lnk)

    Hello Everyone,

    I'm trying to retrieve the target-property from an shortcut-file (*.lnk), but still no luck.
    I've been searching the web for 2 days straight now, but still no code.
    Could someone please help me?

    Thanx in advance,
    Peter Vizee

  2. #2
    Member
    Join Date
    Jun 2000
    Location
    France
    Posts
    51

    Smile Target of a link file

    Hello

    I posted the same ask yesterday (the title is : Target of a link file)

    http://www.vbforums.com/showthread.php?threadid=78615


    I hope they help us !


    Thank you.

  3. #3
    Member
    Join Date
    Jun 2000
    Location
    France
    Posts
    51

    Cool Try this !

    Function PathFile(z$) As String

    Open z$ For Binary As #1
    s$ = Input$(LOF(1), #1)
    Close

    Do While s$ <> ""
    i$ = Mid$(s$, 1, InStr(s$, Chr$(0)) - 1)
    If InStr(i$, ":\") Then
    If InStr(1, i$, "#") = 0 Then PathFile = i$: Exit Do
    End If
    s$ = Mid$(s$, InStr(s$, Chr$(0)) + 1)
    Loop

    End Function


    Private Sub Command1_Click()
    'Mettre le chemin du raccourci ici :
    z$ = ""
    MsgBox PathFile(z$)
    End Sub


    Thanks to int19h (forum VBfrance) for his help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width