I'm trying to open an application by using it's shortcut file in C#. right now I am able to get it's path but I Wanted to know if I can get it's icon too or not? (I mean the icon of the application which is located in it's main folder not the icon of it's shortcut) thank you.
Right Now My Code is like this:
public static void DoSomeHeavyLifting()
{
string filepath = @"C:\Users\Hello\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Adobe Photoshop 2020.lnk";
string pathOnly = filepath;
string filenameOnly = filepath;
Shell shell = new Shell();
Folder folder = shell.NameSpace(pathOnly);
FolderItem folderItem = folder.ParseName(filenameOnly);
if (folderItem != null)
{
Shell32.ShellLinkObject link = (Shell32.ShellLinkObject)folderItem.GetLink;
Console.WriteLine(link.Path);
}
}
as you see I can Only Have link.Path But I want it's icon too