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

[Haskell-cafe] Opening Windows .lnk Files

0 views
Skip to first unread message

Dominic Steinitz

unread,
Mar 22, 2008, 11:02:17 AM3/22/08
to haskel...@haskell.org
Does anyone know how to do this? If I open a file on Windows e.g.
"asn_application.h.lnk" then I get the link data rather than the data in
the linked file.

Thanks, Dominic.

_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Neil Mitchell

unread,
Mar 22, 2008, 1:11:34 PM3/22/08
to Dominic Steinitz, haskel...@haskell.org
Hi

Drop into the command line, rename the file from foo.lnk to foo.txt,
using "ren foo.lnk foo.txt", then open "foo.txt". It's a chunk of
binary goop, so will likely not be much use.

There is a COM class for editing shortcut files (IShellLink), which
I've used before from C code. See
http://darcs.haskell.org/hugs98/src/winhugs/installer/ShellCode.cpp,
in particular the CreateShortcut function.

Thanks

Neil

Dominic Steinitz

unread,
Mar 22, 2008, 1:34:13 PM3/22/08
to Neil Mitchell, haskel...@haskell.org
Neil Mitchell wrote:
> Hi
>
> Drop into the command line, rename the file from foo.lnk to foo.txt,
> using "ren foo.lnk foo.txt", then open "foo.txt". It's a chunk of
> binary goop, so will likely not be much use.
>
> There is a COM class for editing shortcut files (IShellLink), which
> I've used before from C code. See
> http://darcs.haskell.org/hugs98/src/winhugs/installer/ShellCode.cpp,
> in particular the CreateShortcut function.
>
> Thanks
>
> Neil
>
>
>
Neil,

Thanks but following a discussion on #haskell, it's all beginning to
sound a bit hard. Somehow I thought it would be easy. I know where the
real files are so I'll just set a directory as a parameter, strip off
the .lnk from the name and use that + the directory to manipulate them.

Dominic.

0 new messages