Specialized Keys

When Windows XP 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:

  • HKCR\ progid. This is the program class associated with the file extension key through the file extension key's default value.

  • HKCR\SystemFileAssociations. This key defines perceived file types, and associates commands with each. See "

  • HKCR\*. This is the base class for files of all types. You see the commands in this key on the shortcut menus of all files.

  • HKCR\AllFileSystemObjects. This key defines commands for all files and folders. By default, this key just adds the Send To item on shortcut menus.

The sections following this one describe some of the keys in the previous list as well as others that are useful for customizing Windows XP. Notably, the section "

Applications

To display an application in the Open With dialog box, that application must register in HKCR\Applications. Each subkey in Applicationsbears 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:

  • NoOpenWith. This empty REG_SZvalue indicates that Windows XP should not add the program to the Open With list.

  • FriendlyAppName. This REG_SZ value contains the application's friendly name. This value can contain a string, but it more likely contains a value in the format @file,-resource, where file is the name of the program file containing the string resource identified by resource.

  • SupportedTypes. This subkey contains a list of file extensions, including the leading period, which indicates which type of files the program can open. For example, HKCR\Applications\mplayer2.exe\SupportedTypes contains the empty REG_SZ values .asf and .mp3, indicating that the program can open files that have these file extensions. This list filters the Open With list.

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 "PerceivedType," earlier in this appendix. Thus, setting PerceivedType 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 section "Program Class Keys," earlier in this appendix.

Unknown

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



Microsoft Windows XP Registry Guide
Microsoft Windows XP Registry Guide (Bpg-Other)
ISBN: 0735617880
EAN: 2147483647
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net