brandonhorst 0 Newbie Poster

Hey guys,
You folks have been a brilliant help to me in the past and I was hoping you could help me with this most peculiar of issues.

On Windows 7 (Not a problem on Vista), when you preform a search, the file paths that are returned for the matched items all contain references to "My Documents," "My Pictures," "My Music," and "My Videos," while the actual file paths are only "Documents," "Pictures," "Music," and "Videos." The "My" prefixes are return by the search, but the physical folders (i.e. in C:\Users\myusername\Documents) do not have them.
You can test this for yourself by pulling up a big search window, going to the "details" view, and expanding the "folder" column so you can see the path with the errant "My " in it.

Normally this is not a problem, or not even noticed, because Windows Explorer automatically works between the two nomenclatures. However, other programs do not work so nicely.

In my specific case, I am using Windows Search through COM by a SQL Query. For example:

SELECT System.ItemPathDisplay FROM SYSTEMINDEX WHERE Contains(System.Kind,'music') ORDER BY System.DateAccessed DESC

Then, when I try to access the string stored at System.ItemPathDisplay, it includes the stupid "My ", which means I can't use that exact path for anything. Of course, I could simply remove the "My " with a string replace function or something, but this is inelegant, and only necessary on Windows 7 (and would break the code for Windows XP and people who renamed their profile folders in Vista).

Does anyone know why this is, what to do about it, or really anything about the problem?

Thanks in advance,
~Brandon