Wanted: a little class around here

  • Thread starter Rev. Bob 'Bob' Crispen
  • Start date
R

Rev. Bob 'Bob' Crispen

A little class for a specific type of folder, that is.

Let me explain. I generally organize my Start menu pretty anally,
which means an extra step after nearly every install, but at least I
can find stuff without seeing a jungle of (mostly) corporate names
and product names.

So anyhow, in my folder (program group) that holds 2D graphics
applications I've got a "Doc" subfolder. Ditto for my folder for 3D
graphics, and so on. And to make things a little nicer, I've put a
special icon on all program group folders. And then, one at a time,
I've gone through the folders and put a special icon on my "Doc"
folders so I can find them easily.

Clear so far?

Wouldn't it be nice, I said to myself, if I could create a special
class of folders that I could use for "Doc" folders? Then I could
customize the icon for the folder class once and all the folders of
that class would get their icon automatically.

There are things that are darn close to it: first there's the whole
idea of program groups, which are just a class of folders. Then
there's the way you can add things to namespaces. It looks like
somebody who actually knows something about Windows should be able to
create a new folder type without having to go through Active
Directory (which is the only reference I found on MS Techweb for
"folder class" and looks like something different anyhow).

Anybody tried this?
--
Rev. Bob "Bob" Crispen
bob at crispen dot org
Ex Cathedra weblog: http://blog.crispen.org/

The Golden Age of the Internet was last year. The Golden Age of the
Internet was *always* last year.
 
R

Rev. Bob 'Bob' Crispen

I have not completely understood your post...

See if this program can do what you need:

http://www.stardock.com/products/iconpackager/

Not really. See, what I have is a set of folders that contain the same
sort of information. In this case, documentation about programs in a
program group, but it could be any sort of file, really.

What I'm after is a way within WinXP to treat those similar files as a
class. For example, they'd all display the same icon, just as folders
that are program groups display a different icon from other folders.
I'd settle for that, but if there were a way to make classes out of
other kinds of folders (e.g., folders containing music) so that their
"open with" would be specific to that class) that would be even cooler.

I've got some icon utilities I'm very pleased with: IconShop does an
excellent job of displaying and extracting icons and Desktop Architect
does a fair-to-middling job of managing themes, including icon
assignment. And I've got some other associations besides icons with
certain file types (e.g., .avi, .jpg) so Icon Packager doesn't look
like it gives me much value.

So, put another way, is there a wsy within Windows (especially
Explorer), preferably without having to code and debug handlers, to
subclass the Folder class?
--
Rev. Bob "Bob" Crispen
bob at crispen dot org
Ex Cathedra weblog: http://blog.crispen.org/

The Golden Age of the Internet was last year. The Golden Age of the
Internet was *always* last year.
 
H

Homer J. Simpson

It won't be automatic, but I've used desktop.ini files in specific folders
to associate a custom icon to replace the standard folder one. Whether you
do this for Start menu folders or data folders or stuff under Program Files,
the technique works the same.

If you can settle for that...just create a desktop.ini file with Notepad (or
whatever) containing something similar to the following:

[.ShellClassInfo]
IconFile=[PathToSomeIcon]\mycustomicon.ico
IconIndex=0

Then make the folder itself read-only (attrib +r c:\somefolder)--or you
won't get the custom icon to show. You may need to restart explorer.exe to
get the tree on the left to refresh properly. Also, remember to surround
the path to your custom icon files with double-quotes if there's a space in
the path (just follow the usual command-line rules).

There's one drawback if you're gonna use a desktop.ini file to customize
individual Start menu folders--the desktop.ini file itself will be displayed
in your Start menu subfolders. :) To solve that, just set the Hidden
attribute on the file itself.

This may not be exactly what you're after, maybe I totally misunderstood
what you're trying to get automatically through shell namespaces, but give
it a shot anyway...there's no third-party crap involved in this, and it's
simple enough for anybody to mess with.
 
H

Homer J. Simpson

Ok, I've re-read your post, and I'm still not sure whether what I suggested
is gonna be useful to you at all or not... :)
 
K

Keith Miller MVP

I do understand what you want, but it's not trivial. If it could be done it would require writing
an icon handler in C#. Don't know if explorer would like/allow an icon handler for folders since it
seems to already have some hard-coded icon handling of its own.

The one thing I could suggest is creating some dummy file types. These could add entries to the
'New' right-click menu. Instead of creating a new file, they could run a script that creates a new
folder with your custom icon already in place. If you're interested in that, I can post a detailed
example.
 
R

Rev. Bob 'Bob' Crispen

Ok, I've re-read your post, and I'm still not sure whether what I
suggested is gonna be useful to you at all or not... :)

No, but thanks for the kind thought. Doing them one at a time, whether
via the .ini file or from the properties menu, isn't the same as doing
them once and for all with a class.
--
Rev. Bob "Bob" Crispen
bob at crispen dot org
Ex Cathedra weblog: http://blog.crispen.org/

The Golden Age of the Internet was last year. The Golden Age of the
Internet was *always* last year.
 
K

Keith Miller MVP

Do you really want something similar to the Start Menu? Have you noticed that folders moved out of
the Start Menu lose the program groups icon? And that folders created elsewhere and moved/copied
into the Start Menu take on the icon? All the icon tells you is that you're in the Start Menu
folder hierarchy. Would having all the subfolders of a particular folder take on the same icon help
you that much?

There is some subclassing already in effect -- take a look at:

"HKCR\SystemFileAssociations\Directory.Audio"

You can see it in effect by creating a new folder, right-click the new folder, and notice the
context menu verbs. Now open the folder's Properties dialog and customize the folder as a music
folder. Right-click the folder again and notice that 'Add to Playlist' & 'Play' are now context
menu options. Unfortunately, explorer doesn't look for a 'DefaultIcon' key here. Also note that
this subclassing is lost when the 'Apply to All Folders' or 'Reset All Folders' is used.

I thing using templates under the 'New' menu is the best way to go.

You can specify:
Icon
Folder Type (docs, music, pics, video)
Initial Icon Style
Thumbnail Pic

What more do you want? :)
 
R

Rev. Bob 'Bob' Crispen

The voices told me that "Keith Miller MVP" <[email protected]>
would say on Wed 22 Feb 2006 10:36:06a:

[Much interesting stuff snipped]
I thing using templates under the 'New' menu is the best way to
go.

You can specify:
Icon
Folder Type (docs, music, pics, video)
Initial Icon Style
Thumbnail Pic

What more do you want? :)

Many thanks. That sounds a step in the right direction. I've been
avoiding playing with the ShellNew thingy ever since I broke Windows
Explorer's ability to create new HTML files. Sigh. Well, no time
like the present.

Thanks again,
--
Rev. Bob "Bob" Crispen
bob at crispen dot org
Ex Cathedra weblog: http://blog.crispen.org/

The Golden Age of the Internet was last year. The Golden Age of the
Internet was *always* last year.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top