In the old post Beyond good ol’ Run key, Part 9 from March 2014 I mentioned a tool called pinenum.exe. I forgot to add it to that post and it was sitting there unwanted and forgotten until recently someone asked me about it, so here it is for your downloading pleasure.
The tool is using an undocumented IID_IPinnedList interface (CLSID = BBD20037-BC0E-42F1-913F-E2936BB0EA0C) to enumerate paths that items pinned to the taskbar (Windows 7+) point to.