I recently had a problem in one of my applications where, when trying to parse .lnk files for target (using the
approach), I would get something like
1
| C:\Windows\Installer\{GUID} |
instead of the path to the executable. Turns out some .lnk files (shortcuts) are of a different breed, ala “MSI Shortcut” or “Windows Installer Advertised Application”.
Here is a module which will let you get the Target path of such a shortcut. It returns NULL if it’s a standard .lnk, which you could use to determine whether to use the
way instead.
Read more
Follow Me!