📜 ⬆️ ⬇️

Tags in Vista - take two

Horrified by the abundance of hatred from the previous article, I decided to slightly brighten up the confusion with the labels for Vista users. Well, in fact, somehow it turned out quite badly - especially since he himself had long wanted to do it, but all hands did not reach ...

So, we meet - Tagg!


What is it?
This is a Windows shell extension that allows additional properties to be bound to a file. While those properties exactly 3 pieces - tags, comment and rating. If you wish, you could add others, but you had to stop at something.

Values ​​are stored in an alternative NTFS stream called TaggData, completely invisible to the user and transparent to the system. Unless you have a paranoid antivirus for which there is a hidden threat from XML in the file stream.
')

How it works?


To begin with, the Tagg.dll library is registered in the system as a COM object using the regsvr32 command (of course, as an administrator). Then a class entry appears under the code name {09ECDDF2-61C3-4bb6-88C6-70BC292AD0EC} .

The next step is to specify which file extensions should be processed by our filter. Unfortunately, in Vista, you cannot specify a global property handler for all files, so you will have to add all the necessary extensions to the HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ PropertySystem \ PropertyHandlers branch. There are already some extensions, so add by analogy.
If for some type of files a handler is already registered - it doesn't matter. Its CLSID is enough to “move” in the additional registry key of the Fallback, and specify our CLSID in the default key - then Tagg will add the existing property set to its own.

Now it is necessary to say where and in what cases the property should be shown for each file type.
In Windows Vista, as in its predecessor, the properties for file types are set in the registry as a string like "prop: System.ItemType; System.Size; ...". For each case, be it a hint, a tile or detailed information, its own line with properties is provided.
Accordingly, we need to insert into these lines the properties we need - System.Keywords, System.Comment and System.Rating. And here, too, there is a setup - these lines are also very scattered around the registry. For example, the main places in order of priority are HKCR \ SystemFileAssociation, HKCR, HKCR \ *. So you have to sweat a little, looking for the right place ... (hint: if you wish, you can write a utility for this;))

Enough words!


For example, add tags to the png-file.
So let's start with binding to the extension.

As you can see, he already had a handler, so the old one was moved to Fallback.
Now we’ll change the properties line for preview a bit ...

and ... voila!

You can change and add tags ...

... group and filter by them ...

... search and lay out (I still don’t know how to correctly translate the stack) ...


Also, they are perfectly integrated into existing programs, such as Photo Gallery ...

... or the Snipping Tool ...


Well, the link to dll-ku itself: merged , rapid , whatever you want)

UPD: version 1.0.0.2 here and here . Fixed bug with random rating in explorer.

From perfection is still far away (manual registration is tedious), but already quite usable.

And by the way, all happy lovers! Less hate and kammokastratsii, more love and creativity!

Source: https://habr.com/ru/post/20256/


All Articles