From: nki00 on
I'm trying to get a file path from a .lnk file. I'm using the following code
for that:
http://support.microsoft.com/kb/130698

In most cases it works flawlessly, but for some links it doesn't work.
Here's an example. If anyone of you has a newer MS Word (version 2003 and
later), if you try it with its shortcut from the start menu, the return path
will be something like this:

c:\windows\installer\{90110409-6000-11d3-8cfe-0150048383c9}\wordicon.exe

when the Word itself is located in a totally different folder.

If I run this file nothing happens, but if I run the link itself in the
Start -> Run, the real Word application starts.

Can you tell me what am I not doing right to get this path?


From: Christian ASTOR on
On 28 sep, 07:23, "nki00" <lukkycha...(a)gmail.com> wrote:
> I'm trying to get a file path from a .lnk file. I'm using the following code
> for that:http://support.microsoft.com/kb/130698
> In most cases it works flawlessly, but for some links it doesn't work.
> Here's an example. If anyone of you has a newer MS Word (version 2003 and later), if you try it with its shortcut from the start menu, the return path will be something like this:
> c:\windows\installer\{90110409-6000-11d3-8cfe-0150048383c9}\wordicon.exe

These are MSI shortcuts.
Use MsiGetShortcutTarget() - MsiGetComponentPath()