Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat are all of the well-known virtual folder GUIDs?
    text
    copied!<p>There seem to be a few virtual folders which have GUIDs associated to them (control panel, desktop) -</p> <p>::{00021400-0000-0000-c000-000000000046} // desktop</p> <p>Where the blazes are these defined? When are they used?</p> <p>What I want is a way to have a string which represents a virtual folder without any ambiguity.</p> <p>If, for instance, I were to create a PIDL for the desktop, the display name comes back as "C:\Users\Steve\Desktop".</p> <p>Well, that's true at the moment - but its not really the correct folder. I can navigate in Explorer to that folder, and it contains a portion of the files on my desktop, not the entire desktop.</p> <p>What I want is a way to encode that location as a string that will always navigate to the virtual desktop folder (the one that has all of its contents, not just a few things).</p> <p>Does anyone know of a definitive list of such GUIDs? Or how I might convert a given PIDL into one?</p> <p>I tried SHGetDisplayName(pidl, SHGDN_*) - every version of that for the desktop pidl gives me either a short "Desktop" or "C:\Users\Steve\Desktop". (I'm logged in under the 'steve' account, obviously).</p> <p>Ideas / comments / pointers?</p> <p>EDIT: So it seems that I can use the given answers below to have a list of Known Folder GUIds. But does anyone know programatically how to convert from a PIDL -> known folder GUID? I assume that I can ParseDisplayName("::{guid}") to get the PIDL, but is there a way to get to the GUID?</p> <p>EDIT2: I still cannot find a way to get to the GUID programatically. However, for my purposes, I am recording the CSIDL_xxx that I use to create the object initially, and write that out &amp; restore it later, and then create a PIDL by way of the CSIDL, which retains its correct identity (ie. it doesn't degrade into "C:\Users\\Desktop" but rather generates a PIDL that really points to the virtual desktop.</p> <p>The trick for me is to always use the CSIDL->PIDL, never going to a string in between. CSIDL->PIDL->string->PIDL = degeneration into non-virtual path.</p> <p>Thanks everyone for the help - and I'll keep looking if anyone finds more on the subject and posts it, I'd be interested! ;)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload