2

Possible Duplicate:
Extract Icon from Windows .lnk (shortcut) file

For example, I have a Shortcut (.LNK) file that has C:\Foo\bar.ico as it's icon. How can I get the path of the icon (C:\Foo\bar.ico) when supplied with just the shortcut file in C#?

I tried using WshShortcut, but WshShortcut.IconLocation only returns a blank string if the icon is an external .ico file. I don't want the index of the icon, just the path of the .ico file.

Community
  • 1
  • 1
chyyran
  • 2,446
  • 2
  • 21
  • 35
  • 1
    I don't want the icon object, I want the string _path_ to the actual .ico or .exe or .dll file itself, where the icon is contained. – chyyran Jan 02 '13 at 20:13
  • It does provide path, in [the other answer, by Robbie](http://stackoverflow.com/a/13574990/1868397) – Algirdas Jan 02 '13 at 20:22

0 Answers0