Found the solution:
Add the COM reference: Windows Script Host Object Model
Code:
using IWshRuntimeLibrary;
private string Resolve(string LnkFilePath)
{
WshShell shell = new WshShellClass();
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(LnkFilePath);
return link.TargetPath;
}
[quoted text, click to view] "Paulo_Amaral" wrote:
> Hello,
>
> My question seens very simple: i want to write a function like
> private string ResolveLink(string LinkFilePath) { ... }
> that receives, for example, "c:\\myshortcut.lnk" and gives back the
> shortcut's target path. Just the target's path.
>