How do I add a custom Folder Type to use as a template in Windows Vista (or Windows 7)?

Solution 1:

I was really curious about this question as well so I tried to look everywhere I could. The farthest I got was this link on MSDN.

It looks like these data you're looking for are stored in the registry key here: hkey_local_machine/SOFTWARE/Microsoft/Windows/CurrentVersion/explorer/FolderTypes

Unfortunately I'm no registry expert so I only went so far as to search out the key and investigate. However, the FOLDERTYPEID constants specified by Microsoft do not appear to be in there. Sorry that's not a complete answer but I searched everywhere and all I could find was more questions on the same topic.

Solution 2:

There is no way to add a new template, but it is possible to achieve a similar effect by first assigning a folder to a particular template, then altering the specifics within the registry.

You need to identify the particular folder after changing it to one of the existing templates within the registry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags\[Whatever]\Shell\

where [Whatever] will be any number

There is a REG_SZ string Value named FolderType for the TEMPLATE type to use: i.e. "MyMusic" for Music, "MyPictures" for images, "Documents" for 'Documents of any type' The text for these is located within the "%WINDIR%/shell.inf" file

The "Vid" REG_SZ String Value contains the Class ID for the "watermark" image. At this time, I cannot comment on what filetypes are valid, but bmp, gif, png or jpg should all be attempted.