Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

get shortcut/lnk target

2 views
Skip to first unread message

Michel bertrand

unread,
Feb 9, 2010, 6:26:06 PM2/9/10
to
has anyone written a function to get the full filename target of a Windows lnk shortcut?

Walter Roberson

unread,
Feb 9, 2010, 6:35:12 PM2/9/10
to
Michel bertrand wrote:
> has anyone written a function to get the full filename target of a
> Windows lnk shortcut?

Could be fairly tricky. Windows lnk shortcuts are examples of a more general
facility to interject arbitrary code into the filesystem that gets executed
when it gets referenced as a file path. For example it could be a device
driver to a encrypted ram disk, or it could be a mount point for a completely
different kind of (non-Windows) filesystem... there isn't necessarily any
meaningful "full filename target" as distinct from the path that includes the
shortcut.

Because the lnk are executables you cannot simply read them using a system
call, the way you might with a unix soft link: you actually have to ask the
desktop to resolve the path for you.

0 new messages