Customizing Windows XP s Open With List


Customizing Windows XP’s Open With List

As mentioned in the previous chapter and again earlier in this chapter, you can use Windows XP’s Open With feature to open a document in an application other than the one it’s normally associated with. This is a great feature that saves a lot of file-type twiddling, and you can make this capability even better by customizing the list of programs that Open With displays in either the submenu or the dialog box.

First, however, you need to know how Windows XP compiles the list of applications that Open With displays:

  • Windows XP checks HKCR\.ext (where ext is the extension that defines the file type). If it finds an OpenWith subkey, the applications listed under that subkey are added to the Open With menu, and they also appear in the Open With dialog box in the Recommended Programs group.

  • Windows XP checks HKCR\.ext to see if the file type has a PerceivedType setting. If so, it means the file type also has an associated perceived type. This is a broader type that groups related file types into a single category. For example, the Image perceived type includes files of type BMP, GIF, and JPEG, while the Text perceived type includes the files of type TXT, HTM, and XML. Windows XP then checks HKCR\SystemFileAssociations\PerceivedType\OpenWithList, where PerceivedType is the value of the file type’s PerceivedType setting. The application keys listed under the OpenWithList key are added to the file type’s Open With menu and dialog box.

  • Windows XP checks HKCR\Applications, which contains subkeys named after application executable files. If an application subkey has a \shell\open\command subkey, and if that subkey’s Default value is set to the path of the application’s executable file, then the application is added to the Open With dialog box.

  • Windows XP checks the following key:

    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer \FileExts\.ext\OpenWithList

    Here, ext is the file type’s extension. This key contains settings for each application that the current user has used to open the file type via Open With. These settings are named a, b, c, and so on, and there’s an MRUList setting that lists these letters in the order in which the applications have been used. These applications are added to the file type’s Open With menu.

Removing an Application from a File Type’s Open With Menu

When you use the Open With dialog box to choose an alternative application to open a particular file type, that application appears on the file type’s Open With menu (that is, the menu that appears when you select the File, Open With command). To remove the application from this menu, open the following registry key (where ext is the file type’s extension):

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ext\OpenWithList

Delete the setting for the application you want removed from the menu. Also, edit the MRUList setting to remove the letter of the application you just deleted. For example, if the application setting you deleted was named b, delete the letter b from the MRUList setting.

Removing a Program from the Open With List

Rather than customizing only a single file type’s Open With menu, you may need to customize the Open With dialog box for all file types. To prevent a program from appearing in the Open With list, open the Registry Editor and navigate to the following key:

HKCR\Applications

Here you’ll find a number of subkeys, each of which represents an application installed on your system. The names of these subkeys are the names of each application’s executable file (such as notepad.exe for Notepad). To prevent Windows XP from displaying an application in the Open With list, select the application’s subkey, and create a new string value named NoOpenWith. (You don’t have to supply a value for this setting.) To restore the application to the Open With list, delete the NoOpenWith setting.

Insider Secret

The NoOpenWith setting works only for applications that are not the default for opening a particular file type. For example, if you add NoOpenWith to the notepad.exe subkey, Notepad will still appear in the Open With list for text documents, but it won’t appear for other file types, such as HTML files.

Adding a Program to the Open With List

You can also add an application to the Open With dialog box for all file types. Again, you head for the following registry key:

HKCR\Applications

Display the subkey named after the application’s executable file. (If the subkey doesn’t exist, create it.) Now add the \shell\open\command subkey and set the Default value to the path of the application’s executable file.

Disabling the Open With Check Box

The Open With dialog box enables you to change the application associated with a file type’s Open action by selecting the Always Use The Selected Program To Open This Kind Of File check box. If you share your computer with other people, you might not want them changing this association, either accidentally or purposefully. In that case, you can clear the check box by adjusting the following registry key:

HKCR\Unknown\shell\openas\command

The Default value of this key is the following:

%SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\shell32.dll,OpenAs_RunDLL %1

To clear the check box in the Open With dialog box, append %2 to the end of the Default value:

%SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\shell32.dll,OpenAs_RunDLL %1 %2




Insider Power Techniques for Microsoft Windows XP
Insider Power Techniques for Microsoft Windows XP (Bpg-Other)
ISBN: 0735618968
EAN: 2147483647
Year: 2005
Pages: 126

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