I made a explorer.exe clone, with a treeview and a listview etc.
Now I need to handle clicking a .lnk file, so I need the destination path of a .lnk file..
You can use a WshShell Object
:
You create a WshShell object whenever you want to run a program locally, manipulate the contents of the registry, create a shortcut, or access a system folder.
and use its CreateShortcut
method:
Creates a new shortcut, or opens an existing shortcut.
The resulting WshShortcut
object contains a TargetPath
property, which is what you're looking for.
Example:
Dim shell = CreateObject("WScript.Shell")
Dim path = shell.CreateShortcut(path_to_your_link).TargetPath
I'd try;
You need to reference a COM object; Microsoft Shell Controls And Automation.