image provider

Registry Tidier


Disclaimer

This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.

Please do not email me about this project without reading the disclaimer above.

If you dig around the registry with regedit.exe, you will see terrifying data values to keys such as {098f2470-bae0-11cd-b579-08002b30bfeb}. These are not encoded data. These are just random strings of gibberish, hopefully unique, used to index some other part of the tree. All links are symbolic and these are the sort of names used when a human has not taken the trouble to assign an intelligible name to the link. Sometimes you will find a link to a link using this cumbersome mechanism.

I suggest writing a tidier to replace these ridiculously long meaningless names with short meaningful ones. This would have two advantages:

  1. It would make the registry more compact.
  2. It would make it easier to understand.
I am not enough of an expert to know if there are any negative consequences from such renaming.

Where do the short names come from? Your program might have a list that you concoct manually. Alternatively, when a name is used as a link to a target, examine the target, and create the target key name based on what you find. The name might not be totally meaningful, but it can’t be worse than what we have now. Sometimes you will have a link to a link. You have to chase the link till you finally find something meaningful on which to base your names for all the intermediate links.

Failing that, just given them short unique names like {place0001}.

To tackle this project in Java, you need the JNI (Java Native Interface) registry poker class.

Adrian Wilkins tells me this project will not work because these godawfully long string values represent 128-bit integer ids that are compiled into the binaries of COM (Component Object Model) DLLs (Dynamic Link Libraries) and other ActiveX components. If you changed the names, links within the registry would still work, but links into the registry would not.

Part of the COM requirements is that your DLL (Dynamic Link Library) should export the standard DllRegisterServer and DllUnRegisterServer methods which create these entries.

Even 128-bit ints are somewhat excessive for a link id. Carrying that 76-byte Unicode string representation in the index is sheer insanity. No wonder the registry is so slow and bulky.

registry

This page is posted
on the web at:

http://mindprod.com/project/registrytidier.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\project\registrytidier.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.235.154.65]
You are visitor number