On 07.09.2014 21:28, Sid Gudes wrote:
The find the folder containing the start menu, call
SHGetSpecialFolderPath with the CSIDL_STARTMENU option. (In Win 7,
this is usually c:\ProgramData\MicrosoftWindows\Start Menu, but might
be different in other versions.)
The start menu items will be in .lnk files, which will have the path
to the program. The format of a .lnk file is here:
http://msdn.microsoft.com/en-us/library/dd871305.aspx.
Parsing a .lnk file by hand looks gnarly, here's an example of some
code that should grab the path from the .lnk file, haven't tried it
myself. http://delphi.about.com/od/windowsshellapi/l/aa072704a.htm
HTH
s
The JEDI jcl library has ShellLinkResolve from lnk to string which
works if the path name is found for the link. Hidden in the XE6 samples
I found ShellTreeView and ShellListView which can be used to search
through rfCommonPrograms and rfDesktop to get the actual installed item
faster than the Where command. The root of each has to be set to these
before starting a loop through the items. I don't know if this covers
all possibilities.
Irwin Scollar
_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi