H2Reg FAQ

See Also

German Translation: Thank you Valeria Aleksandrova (www.pkwteile.de) for this page translation.
Russian Translation: Thank you Piter Swenson for this page translation.

Troubleshooting
Some typical registration problems we find with MS Help 2.

TOC disappears. Registration works only on dev machines

Collection level .Hx? files must not contain reference to a DTD file. 
The customer wont have VSHIK installed and thus wont have the DTD files.

See H2 Collection Tutorial - 3.6 Do Not Add the DTD

MSI & Corruption

Unfortunately it happens. MSI (MS Installer) can screw up and stop the customer from repairing/uninstalling/reinstalling parts of VS. Although not a H2Reg problem a damaged VS installation can stop H2 Registration from working correctly. Often the only way forward is to remove VS or the Help 2 Engine by force and reinstall VS.

See MSHelpWiki: Visual Studio 7.x Installation Problems

H2Reg gives a "locked by another process" error.

The H2 registration API calls can only do one thing at a time on a Windows system. 
Every time you register something the calls are 
1. Lock (Start H2 Transaction) 
2. Perform one or more registrations
3. UnLock (End H2 Transaction) 

Problems occur when another Windows application attempts to perform a registration call during step 2. If this occurs applications such as H2Reg and FAR will keep trying until they eventual Time-out with a message "locked by another process".

We find this problem typically arises when your installer runs H2Reg.exe in "NoWait Mode" or attempts to run more than one program (that makes H2 API calls) at once. The solution inevitably is set your Installer to run H2Reg.exe in "Run and wait mode". Clearing this error may requires a reboot.
 

Another "locked by another process" error

H2 API can get itself confused and not release locked files even after a reboot: see H2 Posts

Disappearing TOC

One of our clients reported the disappearing TOC problem could be caused by registering a collection with an empty TOC under VS 2002 (they plugged other collections into that collection). They found that installing .NET Framework 1.1 SDK updates the help from V2.1 to V2.2 and fixes the problem. Obviously Help 2.2, which is normally installed by VS 2003 is more stable. See also H2 Registration help
 

Some Attributes I declared don't work

In the H2Reg documentation Tim Grantham from Themo picked up an unusual problem. Index.htm uses a HTML comment in the XML data Island. Although the compiler allows this syntax, the effect is that those attributes with Names used more than once are effectively neutralized (as if they had never been declared). So please refrain from using HTML comments in your XML data islands. The problem was discovered in VS 2003 and has been reported to the MS Help team.

<xml>
...
<!-- VS Studio Attributes -->
<MSHelp:Attr Name="Information Type" Value="Orientation"/>
<MSHelp:Attr Name="Information Type" Value="Reference"/>
<MSHelp:Attr Name="DocSet" Value="Visual Basic"/>
<MSHelp:Attr Name="DocSet" Value="Visual Studio"/>
<MSHelp:Attr Name="TargetOS" Value="Windows"/>
<MSHelp:Attr Name="Locale" Value="kbEnglish"/>
<MSHelp:Attr Name="LinkGroup" Value="GettingStarted"/>
</xml>

 

No DExplore auto-detect merge under VS 2005 Beta 2

Watch out for this one. Under VS 2005 Beta 2 only, you need to force a merge so that your collection can be viewed. Most of us depend on DExplorer performing an auto-detect/merge after we register our collection. VS 2005 RTM (Release to Manufacturing) version is OK and will auto merge. See FAQ for more.
 

VS 2005 - Where's my TOC?

We noticed that under VS 2005 RTM our Table of Contents would not display (merge) in the VS 2005 collection TOC. Well actually the introduction page displayed OK in the TOC but no other pages. On closer examination we found that only the introduction page had a full complement of XML data island elements. After adding these XML tags to the other pages, all H2Reg help topics appeared correctly in the VS 2005 TOC. Obviously VS 8 is more fussy about attributes. This is the reason for the H2Reg v1.4.4 minor update.

Here is the XML data Island we placed in the header of each topic of our help. Obviously the two Title items must be adjusted for each topic and you wont need our Helpware Attribute item:

<xml>
<MSHelp:TOCTitle Title="H2Reg Template"/>
<MSHelp:RLTitle Title="H2Reg Template"/>
<MSHelp:Attr Name="helpware" Value="h2reg"/>
<MSHelp:Keyword Index="F" Term="VS.Ambient"/>
<MSHelp:Attr Name="Information Type" Value="Orientation"/>
<MSHelp:Attr Name="Information Type" Value="Reference"/>
<MSHelp:Attr Name="DocSet" Value="Visual Basic"/>
<MSHelp:Attr Name="DocSet" Value="Visual Studio"/>
<MSHelp:Attr Name="TargetOS" Value="Windows"/>
<MSHelp:Attr Name="Locale" Value="kbEnglish"/>
<MSHelp:Attr Name="LinkGroup" Value="GettingStarted"/>
</xml>
 

VS 2005 Pre-Merge

Here is H2Reg script required to pre-merge a VS 2005 collection at registration time. We found that both MS.VSIPCC.v80 and MS.VSCC.v80 need to be merged. Otherwise you will still see the merge update message when you open the VS 2005 document viewer.

To merge all versions of VS use 

    [Merge_Namespace] 
    ms.vsipcc+ 
    ms.vscc+ 

To merge VS 2003 and above 

    [Merge_Namespace] 
    ms.vscc.2003 
    ms.vsipcc+ 
    ms.vscc.v*


To merge only VS 2003 + VS 2005 + VS 2008

    [Merge_Namespace] 
    ms.vscc.2003 
    ms.vsipcc.v80 
    ms.vscc.v80 
    ms.vsipcc.v90 
    ms.vscc.v90

VS 2005 Express Pre-Merge

We've had a few folks asking how to integrate content into VS 2005 Express (the cut-down version of VS 2005). Is it the same as VS 2005?
With Express you still plug into MS.VSIPCC.V80 (so plug-in section does not change).

Express uses a collection called MS.VSExpressCC.v80 instead of ms.vscc.v80.
So if you use a pre-merge section (also requires the h2reg.exe -M command switch )
then you need to add this extra collection name.

To merge all versions of VS use 

[Merge_Namespace] 
ms.vsipcc+
ms.vscc+
ms.vsexpresscc+


To merge VS 2003 and above 

[Merge_Namespace] 
ms.vscc.2003
ms.vsipcc+
ms.vscc.v*
ms.vsexpresscc+


To merge only VS 2003 + VS 2005 + VS 2008

[Merge_Namespace] 
ms.vscc.2003
ms.vsipcc.v80
ms.vscc.v80
ms.vsexpresscc.v80
ms.vscc.v90
ms.vsexpresscc.v90


28-June-2006

MS did not plan on 3rd party plug-ins in VS 2005 Express. If you want your plug-ins to appear in Express then an extra attribute "DocSet=ExpressLibVS" is required in the XML data Island of all HTML files. See thread in MSHelp2 Yahoo Group.

<xml>
<MSHelp:Attr Name="DocSet" Value="ExpressLibVS" />
...
</xml>

How to Customize Visual Studio 2005/2008 Search

Under VS 2002 & VS 2003 you could register filters that would effect the TOC, Index and Search.
However under VS 2005 registered filters only effect the TOC and Index. 

Q. Can H2Reg create VS 2005/2008 search filters? 
A. No Microsoft have provided a new mechanism for setting up VS 2005 filters.


The following article will help you setup VS 2005/2008 search filters:
Extending Visual Studio 2005 Search

 

FAQ

Q. Is source code available?
A. No because Microsoft have not released the MS Help 2 API documentation to the general public.

Q. What support is available for H2Reg?
A. Peer-to-peer support is available at 
http://groups.yahoo.com/group/H2Reg/
http://groups.yahoo.com/group/MSHelp2/
H2Reg Newsletter is available at http://groups.yahoo.com/group/HelpwareH2Reg
You can also Contact us if you have questions or want to report a problem.

Q. We use H2Reg but a 3rd party actually distributes our product? Do they also need a H2Reg license?
A. No. If you have purchased a license then what you do with your install package after that is your business.

Q. Is the download really the full release version?
A. Yes. There are no restrictions.

Q. Am I required to pay an annually license fee?
A. No. The license fee is a one time payment.

Q. Do I still need to use the Microsoft VSHIK .MSM MSI Help Registration Files?
A. No. You simply use your own installation program to install all files. 
Then run H2Reg.exe to register the help files.

Q. We use H2Reg Internally only. Do we have to purchase a license?
A. H2Reg is free for personal use even for business use. As soon as you packaging H2Reg into an installation to be distributed to other (whether internal or external customers) then you must purchase a license.

Q. How does the H2Reg DLL license work?
A. The H2Reg license covers both the EXE and DLL forms of H2Reg. Normally you would ship either the EXE or the DLL with your installation solution but not both. See the H2Reg.DLL page.

Q. Can I build a general application that uses H2Reg.EXE or H2Reg.DLL to register files?
A. Not without special permission. H2Reg can only be used to help create installation packages. It is illegal for a company or individual to wrap another companies product without permission. An application that enables users to control the registration of MS help 2 files using H2Reg is not allowed. The DLL can only be used to create code used to extend an Installation solution.

Q. Is H2Reg just a wrapper for the H2 Registration API calls?
A. No. H2Reg has many built-in smarts and checks to make sure your customers registration is as simple and problem free as possible. The verbose log file alone can save you a lot of time when debugging.

Q. Is there a new plug-in location for VS 2005?
A. Yes. MS now want 3rd parties to plug their collections into MS.VSIPCC.v80 (was MS.VSCC.*) to isolate 3rd party collections a little more from the main VS documentation. For more info see our FAQ.

Q. How do I adjust my scripts to handle VS 2008?
A. The namespace for VS 2008 is "ms.vsipcc.v90".

Example:

To plug into to VS 2002, VS 2003, VS 2005, VS008 (any installed version) use ms.vsipcc+

[Reg_Plugin]
MS.VSIPCC+|_DEFAULT|MyNameSpace|...

To plug into VS 2008 specifically:

[Reg_Plugin]
MS.VSIPCC.V90|_DEFAULT|MyNameSpace|...

To plug into VS 2005 specifically:

[Reg_Plugin]
MS.VSIPCC.V80|_DEFAULT|MyNameSpace|...