Monday, August 13, 2007

Customize Placesbar (Folderlist) in Windows File Dialog

And while I'm in the "knowledge preservation" mode - this is some piece of information I was look for years (well, not constantly, but every once in a while). I simply did not google for the right thing.

Task: How do I get any (arbitrary) folder into the short-cut bar in the Open/Save-As Dialog in Windows (XP) ?

Not just History, My Documents, My Computer, ... no one needs those.

Answer: First of all, one has to know (i.e. find out) that this short-cut bar is referred to as "places bar" and those folders listed there would then be places.

This way it is much more effective to google for.

The places bar is defined in the registry under HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ comdlg32\ PlacesBar
and consists of 5 entries (this seems to be fixed in the code, I could not find any reference to changing the number of entries),
called Place0-Place4.

For each place you can (read: have to) define its location in the filesystem or a handle to well known or pre-defined windows places.

You must enter the predefined places as numeric values (DWORD), e.g. My Pictures=39, Desktop=0, etc.
There are places on the web, where those values are listed.
I show an excerpt from here. at the end of this post.

Now I'm pretty sure that - like me - you don't just want to have any of those folders there, but something
else, like "D:\download" or whatever. In that case you make a String (instead of the DWORD) and just enter the name of the folder ("d:\download") as the value.

My placesbar at home looks like this (on my business laptop I have more "personal" places defined than just one) and the
registry (ready to import ;-)) like this:

Windows Registry Editor Version 5.00







There are also tools on the web that help you create the respective registry entries. All you have to do then is, copy/paste those to your computer and import the resulting file into the registry.

There you go, quite easy actually.

Here are some of the folder definitions:

My Computer\Control Panel33
My Computer\Printers44
My Documents55
My Musicd13
My Videose14
My Computer1117
Network Neighborhood (My Network Places)1218
All Users\Start Menu1622
All Users\Start Menu\Programs1723
All Users\Startup1824
All Users\Desktop1925
Application Data1a26
USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning3b59

No comments: