> I am searching around, and will provide > a patch that disable this menu item when no viewer is linked to ps > format (and to pdf).
http://www.informit.com/articles/article.asp?p=415193&seqNum=6 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fileassoc.asp How the Open With Feature Works Before you learn about the more advanced Open With customizations, you need to know how Windows XP compiles the list of applications that appear on the Open With list: * Windows XP checks HKEY_CLASSES_ROOT\.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 Programs list's Recommended Programs branch. .ps: I see content type application/postscript .pdf: I see content type, and openwithlist/acrord32.exe * Windows XP checks HKEY_CLASSES_ROOT\.ext to see whether 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, whereas the Text perceived type includes the files of type TXT, HTM, and XML. Windows XP then checks the following: HKEY_CLASSES_ROOT\SystemFileAssociations\PerceivedType\OpenWithList NO ps or pdf * Here, PerceivedType is 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 HKEY_CLASSES_ROOT\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 name of the application's executable file, the application is added to the Open With dialog box. I see gsview32.exe/shell/open/command , and acrord32.exe/shell/read ... * Windows XP checks the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ FileExts\.ext\OpenWithList I have ghostview and firefox. * 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. After I remove ghostview, all the keys are still there. ================================================ I guess windows is doing the following: 1. check HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ FileExts\.ps\OpenWithList 2. from MRUList know a is the application, get gsview32.exe 3. go to HKEY_CLASSES_ROOT\Applications/gsview32.exe key and know the exact command, 4. try to start the document with that command. Now, what I need to do, is to follow the same route and see if any application exists. I can simply check the first key but this is not accurate since gsview will still be there after uninstallation. Please help me check if your system (win2k, 98, xp sp1 etc) have the same keys. Bo