Hey everyone I am working on a start menu style program and would like to know how I get pinned programs and all programs list. I started some research and will post what I found so you can all help fill the gaps.
For getting program icons I found this...
public static Icon IconFromFilePath(string filePath)
{
var result = (Icon)null;
try
{
result = Icon.ExtractAssociatedIcon(filePath);
}
catch (System.Exception)
{
// swallow and return nothing. You could supply a default Icon here as well
}
return result;
}
For getting all programs and pinned programs I find these paths...
%USERPROFILE%\appdata\Roaming\Microsoft\Windows\Start Menu\Programs
C:\ProgramData\Microsoft\Windows\Start Menu\
What are these locations and how does the startmenu utlise these? How can I use them? Hope I am not being to brief but wanted to show I am really working to solve this problem and have been searching a ton. Thanks!