Geoff Chappell - Software Analyst
CURRENT WORK ITEM - PREVIEW ONLY
The Windows Help and Support program in Windows Vista is an integrated help viewer for Windows itself and for almost all the programs that Microsoft includes with Windows. The program draws its content from files in a format that is new to Windows. The main file type has the H1S extension and is described as a Compiled Microsoft Help file. Each H1S file is a package of any number of HTML pages and supporting files such as images. Not only does the help content ultimately consist of HTML pages, it actually is displayed using Microsoft’s web browser, Internet Explorer. The Windows Help and Support window is a browser window with a custom frame.
Pages may show incorrectly in the browser window. In particular, images may be represented by placeholders:
Yet when you use Internet Explorer to browse web pages that contain images, you see nothing unusual. For instance, if you are browsing now from the same computer that shows problems in Windows Help and Support, you see a picture immediately before this paragraph!
The images used in the H1S files for Windows Help and Support are overwhelmingly in Portable Network Graphics (PNG) format. For instance, all but one of the images in the home page, which is shown above, are PNG files stored in ARTICO.H1S. There could be many causes of their failure to show, but the one of concern here is that Windows has lost its record of PNG as a file type.
You can easily confirm this loss in several ways, some of which you may have noticed already as other symptoms of the problem. One way is to browse with Windows Explorer to a directory that contains a PNG file. You would ordinarily expect to see a picture icon, such as , in the Details, List or Small Icons views, with the Type shown as PNG Image. If the registration is lost, the Type is simply PNG File and the small views give you only the plain icon . Alternatively, start Default Programs from the Control Panel, then click on “Associate a file type or protocol with a program” to see a list of registered file types from which “.png” is presumably missing.
If the PNG file type is indeed not registered, then you will have to restore the registration. Unfortunately, no simple solution exists that is certain to work safely in all cases. Provided that the registration is gone completely, which I expect is very likely in practice, then the Clean Registration Entries for the PNG File Type will initialise the following two registry keys
as if Windows were freshly installed. Of course, this is not necessarily what was in those keys before they got deleted, but it is better than nothing and is the best I can think of as being generally recommendable. Before downloading this settings file, much less attempting to use it, start the Registry Editor, browse for those two keys and verify that both are absent. Otherwise, the effect of restoring their initial settings depends on what is now in the keys and is not generally predictable.
If you are concerned for the security implications of downloading a file that may change your computer’s configuration, and I suggest strongly that you should be, then save the settings file instead of opening it, and inspect it using Notepad to check that all it does is specify entries for the two keys above. Note anyway that you need administrative privilege to install these registry settings.
Also note that not all Windows programs will use the new settings immediately. The Windows Help and Support will notice the change when you browse to another page that has images. In other programs, you may see mixed effects, possibly until your next logon.
Of course, the chances are very high that whatever you did that removed the PNG registration has also removed the registration of other file types. The likely culprit is an uninstaller for a program that works with images, whether solely with images or with images in documents. Do not suppose that only an uninstaller from some dodgy software manufacturer would delete registry entries that existed already when the program was installed. One known case comes from Microsoft: uninstalling Microsoft FrontPage 2002 unregisters file types (not only PNG but also ASP, GIF, HTX and JPG).
What makes this problem interesting is of course that PNG files show in a browser window in Internet Explorer but not in Windows Help and Support.
If you doubt that Windows Help and Support shows its documents using Internet Explorer, try the following experiment. Open Internet Options from the Control Panel. On the General tab, in the Appearance group, click Colors. The checkbox labelled “Use Windows colors” is checked by default. Clear it. This enables a choice of colours. Our aim is to change the Background colour in Internet Explorer. If your Windows default is a white background, as shown above, then just accept the default suggestion of grey. Click OK for the Colors dialog. Now start Windows Help and Support and see that its browser window has the background colour that you just set for Internet Explorer. Open the Colors dialog again and restore the use of Windows colours. The background colour in Windows Help and Support changes immediately. Close both Internet Properties and Windows Help and Support.
That PNG files on an HTML page show as pictures in Internet Explorer without needing to be registered in HKEY_CLASSES_ROOT is because the file name is mostly irrelevant. When MSHTML.DLL, which is the main executable involved in rendering pages for Internet Explorer, downloads a file because of a reference on a web page, it has the contents of the file and also, typically, something called a Multipurpose Internet Mail Extension (MIME) type from the server, and also of course the file’s URL. For identifying the type of file for an <img> tag, MSHTML feeds these pieces of information to URLMON.DLL via the FindMimeFromData function. There are numerous subtleties to this function, which are beyond the scope of this note (and also of Microsoft’s documentation), but it seems reasonable to summarise the function as follows. Provided that the MIME type is not too obscure, URLMON gives the greatest priority to what’s actually in the file. If inspection shows that the file’s contents are in one of several known formats, such as PNG, then the name of the file, and particularly the file extension, is irrelevant.
For a demonstration of this, consider the small PNG image , which is copied from Microsoft’s icon for PNG files. If you view the source code for this page, you will see that the URL in the <img> tag has .TXT as its file extension, yet the file shows as an image (even if “Open files based on content, not file extension” is disabled in the Security Settings).
Why then do PNG files not show in Windows Help and Support unless the file type is registered? The immediate answer is that MSHTML doesn’t receive a file to show. It’s all to do with the server.
TO BE CONTINUED