H2Reg : by Helpware‎ > ‎H2Reg FAQ‎ > ‎

H2Reg & Installers

Here are some tips with running H2Reg.exe from several popular installers.

See also: Polish translation | Portuguese translation 

INNO Installer 

INNO a popular free installer. We use INNO installer to package the H2Reg download. During installation, Setup registers our H2 document files under the Namespace "hw.H2Reg". It registers a Filter under "hw.h2reg", and even performs a plug-in of "hw.h2reg" into the VS .NET help collection "ms.vscc" (VS 7.0), or "ms.vscc.2003" (VS 7.1), or "ms.vsipcc.v80" (VS 2005), or "ms.vsipcc.v90" (VS 2008) whatever is found. Notice that the filter appears in the MS.VSCC since we have plugged into that collection. Then when you uninstall, it unregisters what was registered. H2Reg documentation also comes in .CHM file format.
We've included our INNO setup file (h2reg_setup_script.iss) to help you get started. 
INNO setup Website: http://www.jrsoftware.org/isinfo.htm

Click here for an example of INNO installer script calling H2Reg.exe. Thanks Thomas Kux (www.wxwindows.org).

Wise for Windows 

Wise Installer 4.02 Professional Edition (http://www.wise.com)
Tim Hitchings from Infragistics has kindly written some instructions to help Wise users.
Comments from Tim:
  1. In the same location as your collection and help files install a h2Reg_CmdFile.ini file for each collection you are installing.
  2. In the same location install a copy of H2Reg.exe and H2Reg.ini.
  3. Using the 'MSI Script' section of Wise, chose the 'Execute Deferred' tab.
  4. After the 'InstallFiles' sequence item add an 'If NOT Installed' condition.
  5. In that 'If NOT Installed' condition block add an 'Execute Program From Destination' action.
  6. Set the actions' working directory to the location of H2Reg.exe and the EXE and Command Line to something like '[WORKDIR]H2Reg.exe -Q -R "cmdfile=H2Reg_YourProduct_HELP.ini"'
  7. Add an action for each ini file.
  8. To create a set of actions that will be called during the uninstall add a condition block prior to the 'RemoveFiles' sequence item.
  9. The condition should be 'REMOVE~="ALL"' which will cause the items inside the block to only be executed during an uninstall.
  10. Add the same type of actions as were created above for the installation.

NDOC

NDoc is a free utility for generating class library documentation from .NET assemblies and the XML documentation files generated by the C# compiler. NDoc users add-on documenters to generate documentation in several different formats, including the MSDN-style HTML Help format (.chm), the Visual Studio .NET Help format (HTML Help 2), and MSDN-online style web pages.

The following article by Fons Sonnemans describes how to Integrate NDoc HTML Help 2 into Visual Studio.NET with the help of H2Reg.
http://www.reflectionit.nl/NDoc.aspx

The NDOC web site describes how to setup NDOC to generate H2Reg script.
http://ndoc.sourceforge.net/content/vsnet-deploying.htm

West Wind Html Help Builder 4.0 (beta 2)

Rick Strahl from West Wind Technologies describes
building MS help 2 documentation while using H2Reg.exe to register the help files.

Doc-O-Matic

Doc-O-Matic is another popular authoring tool that uses H2Reg
http://www.doc-o-matic.com/art_help2plugin.html

MSI (Microsoft Installer)

If you create a .MSI install package using say Visual Studio 2005 (a Setup Project) then you can specify a "Custom Actions" to run H2Reg.exe on install and uninstall. Just remember that H2Reg.exe is now marked to run in elevated mode, so execution will can fail because MSI impersonation is on by default. Simplest fix is to create a Setup.exe file to launch your .MSI file. Setup.exe will run in elevated mode and so will the .MSI so any elevated helpers (shuch as H2Reg.exe) will also run correctly.
Comments