This project outline is not like the artificial tidy 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, 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 endeavor.
In Windows 95/98/ME/NT/W2K/XP/W2K3 you can associate a given file extension with a program or programs to process it. The editor that comes with Windows is clumsy for three reasons:
Starting with Windows 2000, class registration and file extension information is stored even more redundantly under the HKEY_CURRENT_USER\Software\Classes key as well, ironically with the intent of making the registry more compact. The HKEY_LOCAL_MACHINE\Software\Classes key contains default settings that can apply to all users on the local computer. The HKEY_CURRENT_USER\Software\Classes key contains settings that apply only to the interactive user. The HKEY_CLASSES_ROOT key provides a view of the registry that merges the information from these two sources. See the Microsoft Documentation.
| How Windows Stores Extension Associations | |||
|---|---|---|---|
| Name | Example | Where Defined | Where Referenced |
| Extension | .exe | HKEY_CLASSES_ROOT\.exe | none |
| Internal Name | exefile | HKEY_CLASSES_ROOT\exefile(Default) | HKEY_CLASSES_ROOT\.exe |
| Mime Type | application/x-msdownload | HKEY_CLASSES_ROOT\.exe(Content Type) | none |
| External Name | Application | HKEY_CLASSES_ROOT\exefile(Default) | none |
| Action | open | HKEY_CLASSES_ROOT\exefile\shell\open | none |
The second half of this project is work out a replacement for the extension scheme, something that might be used in a sane OS, such as ROS. The associations must be much simpler, secure and automatic than in Windows.
Every file has a unique type, similar to MIME, but properly unique, more like Apple’s file type registering scheme. IANA would likely oversee it. Vendors can also create new private file types within their single registered DNS domain, without needing to centrally register them. (In contrast, the same extension in Windows may be used for several totally unrelated formats, e.g. *.doc )
Vendors can register their applications to handle given file types. They can’t unregister other vendors. The originator of a file type must provide a comb program. This studies the file and decides if it is logically consistent. ROS invokes the comb any time two different vendors operate on the same file. In addition, a vendor may supply his own comb that protects him from rival vendors mucking up the file layouts. ROS also uses the combs when it has nothing better to do to ensure file integrity.
When an application is activated/installed, the OS adds that application to the right click menus on all the files it can process. It does not highjack any current application’s associations. If the user starts to mainly use the new program, its will percolate up the menu. It works by a lazy MRU (most- recently used) ordering scheme so that the menu order does not change frequently. The user can freeze menus or manually reorder them.
Users never manually create associations or break them. They merely temporarily hide them from their menus.
In ROS, the associations are self healing. When it has nothing better to do, the OS does a level 1 diagnostic, monitoring their integrity and automatically repairs them if they become damaged.
You might attempt to retrofit some of these features into Windows by maintaining a robust parallel associations database that is used to repair the Windows one.
PC Mag has one available with source called ContextEdit. It does not deal with the OpenWithList and PersistentHandler options in the registry. It does not give you the ability to order the open, edit, print etc. options. And finally it is full of technobabble e.g. "%1" DDE, &Edit. It needs a veneer put on it so that it could be used by an ordinary human. It presumes you already know how to edit the registry directly, and this primarily a tool to make it easier by finding the parts for you.
| You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | |
| http://mindprod.com/project/association.html | J:\mindprod\project\association.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.191.108] | |
| Feedback | You are visitor number 11. | |