Microsoft Windows Registry Guide, Second Edition

Specialized Keys

When Windows queries a file association, it checks the following keys in the order shown; that is, locations further down the list have a higher order of precedence than locations higher in the list:

The following sections describe some keys in the previous list as well as others that are useful for customizing Windows. Notably, the section “SystemFileAssociations” describes how to customize the commands you see on files perceived as a certain type. The section “Applications” describes how to customize the Open With dialog box and more.

Applications

To display an application in the Open With dialog box, that application must register in HKCR\Applications. Each subkey in Applications bears the name of the program file. For example, Notepad is in HKCR\Applications\Notepad.exe. You must also add the OpenWithList key to the file extension key, as described earlier in this appendix. You find combinations of the following values and subkeys in the program's subkeys:

SystemFileAssociations

The key HKCR\SystemFileAssociations is a cool way to customize the shortcut menus of files by their perceived purposes. For example, you can customize the verbs you see for all files you perceive as text files or all files you perceive as image files.

HKCR\SystemFileAssociations contains subkeys for the different perceived types you can set in the value PerceivedType. You learned about this value in the “PerceivedType” section earlier in this appendix. Thus, setting Pe rceivedType in a file extension key associates that file name extension with the commands in this key. For example, if you set the value PerceivedType in HKCR\.inf to text, you'll see the commands in HKCR\SystemFileAssociations\text on the shortcut menu of any file that has the .inf extension. Perceived types in SystemFileAssociations include audio, image, system, text, and video. You can add additional perceived types to SystemFileAssociations, though. The organization of HKCR\SystemFileAssociations\type is the same as program classes, which you learned about in the “Program Class Keys” section earlier in this appendix.

Unknown

When users try opening files that have an extension not registered in HKCR, Windows looks in HKCR\Unknown. By default, the only verb in Unknown\Shell is Open As. Windows displays the Open With dialog box for unknown types of files.

Категории