How to get icons of shortcuts(.lnk) without error?

S

Sin Jeong-hun

I would like to display the shortcuts in a folder on my C#
application. Of course I would like the linked application to be
executed when the user double click on a icon.

To do so, I need to be able to get the icon and the target path
from .lnk files. I've searched Google and found that many pages lead
to http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp.
The sample program looked fine and I thought it would give me all the
things I wanted. BUT, I think that sample program has some bugs. It
didn't always display icons for all .lnk files. For some .lnk files,
all other information were displayed correctly but the icon was not
displayed.

Is there a 100% working way of getting icons from .lnk (shortcut)
files?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top