What is HXS?
HXS is the most recent change in Windows help files.
In Windows 95 Microsoft used .HLP help files for documentation. HLP files have a maroon book icon (later changed to a blue circle with an "i" or "?") and use the "Rich Text" format seen in RTF and DOC files.
(HLP files are still in use, but Windows Vista/7 does not have native support for them. It must be installed.
If you ended up here because you want to
open .HLP files on Vista/7, see this topic below. If you ended up here because you want to convert HLP files to CHM,
see this topic below. )
When the Internet craze hit, circa 1998, Microsoft
began to "webbify" everything in sight. One such casualty was the HLP file and the Windows help system. HLP files were replaced by CHM help files, which use an Internet
Explorer browser window to display "webby-looking" help topics. (In case anyone missed that point, the standard design for the first page in CHM files,
for a long time, included an animated GIF of a spinning globe that seemed to say, "Look! This is webby! Isn't that cool?!")
CHM files have been the recommended help format ever since Windows 98 and Active Desktop.
These days, most software still uses CHM help files, but Microsoft also created an altered version of HTML help that they use with their
Visual Studio product, SDK packages, etc. They call it "HTML Help 2". The file extension is .HXS. While CHM files were a questionable "improvement" born
of the Web/HTML craze, HXS files are an unnecessary change born of the XML craze. Worse, they are not compatible with current Windows help. HXS files require
their own reader, which is part of the Visual Studio .Net product and is not available as standalone software or as a Windows update.
What if you want to read recent Windows programming documentation (anything since about 2001), and you don't happen
to program in .Net on Windows 7? You may have difficulty. The Windows 2003, 2008 and 7 SDK docs are in HXS format, and in some cases the Windows SDK
documentation downloads will not install on all Windows versions. The system is designed to only work well if you buy Visual Studio.Net, buy the latest version
of Windows, and then write .Net software on your new Windows PC.
(Microsoft also decided to be "less than truthful" in their SDK documentation at some point, misleading people about
the viability of older Microsoft products. For instance, if you look up the common API function
GetTempPath at MSDN you'll be told that it works only on Windows XP and later. Yet older
versions of MSDN docs acknowledge that
GetTempPath dates back all the way to Windows 3.1.
Microsoft has provided such false information throughout the API docs, essentially denying the existence of older Windows versions.
...But that's another issue that is not addressed here. Ideally people doing Windows programming will have multiple versions
of MSDN docs to consult.)
Update note - January 2018: Some faulty HXS files were found in the
Windows 7 SDK. Microsoft seem to have changed the way they create HXS files, at least in some cases.
The new version was resulting in empty CHM files. See the help file in the download for a full explanation.
This latest update is a fix for that problem.
Converting HXS to CHM
The basic design of HXS (Help2) and CHM (Help1) files is the same. Under the hood, both CHM and HXS are really nothing
more than a website packed into a compressed file. Both consist of a collection of webpages,
images, CSS files, etc. And both usually include files that provide the index and table-of-contents functionality. The main
change with HXS files consists of replacing some of the HTML code (in the index and TOC files) with XML. Also, a custom, pseudo-HTML link tag -- only recognized by
the HXS reader -- has replaced the <A> tag in some webpages
within HXS files. But the two
formats are close enough to allow for conversion. In fact, they are just different enough to ensure incompatibility. (Surprise, surprise.)
There are
3 main script tools in this download:
1) ConvertToCHM2.vbs - Drop a folder containing any number of HXS files onto the script and they will be converted.
This script is simple to use but requires minor editing to set custom options and required values, such as the path to the HTML Help compiler.
2) HXS to CHM Converter -
The easy way. This is an HTA program (a webpage that
runs in an Internet Explorer window) that provides a point-and-click
method to convert HXS to CHM easily. It puts the whole operation into a convenient webpage interface, so that everyone can
convert HXS files easily, without needing to know about scripting or webpage coding.
If you know about CSS you can even
customize the appearance of the resulting help file, in terms of colors, fonts, layout, etc. The HTA provides a text box to enter
any amount of CSS, which will then be inserted in a STYLE tag at the top of each webpage in the help file. But
you don't have to
know about any of that to use the HTA converter.
3) Create WebHelp From HXS.vbs - Similar to the first script, but instead of creating CHMs this script unpacks multiple HXS files
to create something like an on-disk website. (HTML Help files, after all, are little more than websites packed into a ZIP file.)
The script then creates an HTA (webpage) help reader for the extracted help files, with a single, common index. The idea here is
to create something akin to the MSDN help reader.
Download HXS Converter Package (194 KB)
Requirements
Converting HXS to CHM involves unpacking the HXS file, processing the contents, and recompiling to
CHM format. The converter is entirely written in VBScript. It does not require .Net, Visual Studio, HXS viewers, or
any other HXS-related software. But it does require two things to do its work:
7-Zip,
a free ZIP program, is used to unpack HXS files, and Microsoft's free
HTML Help Workshop
compiler is used to build the CHM file.
The conversion process is entirely automated, but those two programs must
be installed.
Technical details
(See the documentation in the download for thorough information about how the scripts work and for the update history.)
A CHM file involves an
HHP project file, an
HHC table of contents file,
and an
HHK index file, in addition to any number of webpage and image files that make up the actual content of the CHM help file.
HXS files are similar. They contain an
HXT file that corresponds to the
HHC file. And they may or may not
contain an index file. The basic idea is the same: A collection of webpages compressed into a single file,
with links, index and table of contents.
In addition to the basic format/file conversion from HXS to CHM, there are some minor issues addressed by these converter tools:
Script problem fix: In recent renditions of the Microsoft help files there is often a great deal of superfluous and problematic script
used. Example: The document object topic page for Internet Explorer does not provide an option to show all properties and
methods at once. One has to click the "Properties" link to see the list of properties, then click a button to expand the viewport. Then to see the methods
list, the "Methods" link must be clicked...which makes the Properties list disappear and collapses the viewport...which requires
another click on the expander button...and so on. The result looks clever but is maddeningly difficult to use.
The converter scripts include options to remove all such nonsense during the conversion
process. All SCRIPT tags and all "display:none" CSS code is removed, so that the full content of a topic page is always visible.
A Favorites panel: The CHM files produced from HXS files by the converter scripts include a Favorites panel. Did you know
that all CHM files can have a Favorites panel? It's especially handy with large files. A Favorites panel allows you to save links
to often-visited topic pages. It's just like a Favorites menu in a browser. But the Favorites panel, inexplicably, is disabled by default,
so most CHM files do not show it!
Using these HXS converter tools you can not only convert HXS to CHM but also improve
the resulting help in the process by customizing the appearance for readability, improving the functionality, and adding a Favorites panel. What does this mean
for Windows programmers and others? Say, for instance, that you like to program with VB, Delphi, or C++ on
Windows 2000, XP, or Vista. In that case you probably can't read HXS files and the latest Windows SDK downloads may not even install on your system. For many people, like scripters and system administrators who don't have any use for .Net, the situation is even worse.
All of the help files that used to be offered as CHM files in small, convenient SDK downloads are now only available as HXS files in the gigantic Windows Platform SDK. That includes such predominantly-scripting topics as MSI, WMI, IE, DHTML, ADO, CDO, Group Policy, Shell automation, etc.
With the ability to convert HXS to CHM, you can access any Windows docs as follows:
1) Download the SDK of interest.
2) Optional: Use an
MSI unpacker to easily extract the HXS files.
3) Produce CHM files from the HXS files.
The result is up-to-date
documentation -- in your choice of fonts, colors, etc. -- that can be used on any Windows system from Win95 up. And
if you happen to be a scripter who only wants, say, the IE DHTML scripting docs, then you can extract only that HXS
from the Windows SDK (using the MSI unpacker tools) and convert it to CHM.
Other issues: HLP files:
.HLP Files on Vista/7
Microsoft broke compatibility for .hlp files on Windows Vista/7. They
no longer officially support their own help file format! However, Vista/7 can be repaired
with a small download to install
WinHlp32.exe, the program that opens .hlp files.
Download
There are two ways to get the Vista/7
HLP fix. You can get it directly
from Microsoft, but they insist on "validation" for that. Validation means that you allow Microsoft
to snoop around on your PC, allegedly to make sure you have a legal copy of Windows. If you
don't want to allow Microsoft spyware, search for the download file names to get the download
from a third party:
Vista 32-bit: Windows6.0-KB917607-x86.msu
Vista 64-bit: Windows6.0-KB917607-x64.msu
Win7 32-bit: Windows6.1-KB917607-x64.msu
Win7 64-bit: Windows6.1-KB917607-x86.msu
Converting HLP to CHM
There is no easy way to convert HLP files to CHM files. HLP is based on RichText format. CHM is
essentially a website in a ZIP file. Using
HelpDeco and HelpDecoGUI
you can decompile your HLP file. From there you must create the HTML pages for topics and create a new
project in Microsoft's free
HTML Help Workshop.
You'll find it easier if you know some kind of scripting that you can use to automate some of the repetitive work involved.
There is in-depth, clear and helpful information about the details you need to know
here.