Dela via


HxReg.exe

Command-line program that registers or unregisters namespaces and aliases, and adds or removes Help files for registered collections.

Hxreg [-n[namespace]] [-i[unique identifier]][-c[filename.HxC | filename.HxS]] [-d[description]] [-s[filename.HxS]][-x[filename.HxI]] [-q[filename.HxQ]][-l[language identifier]] [-a[alias]] [-f[input filename]][-r]

Command-line Options

The following table describes the command-line options that are available.

Option

Value

Description

-n

namespace

Specifies the namespace for the collection being registered. This value should not exceed 255 characters.

-i

unique identifier

Specifies the unique identifier for the collection or Help file.

-c

filename.HxS | filename.HxC

Specifies the path to the collection file to register.

This can reference either a collection definition (.HxC) file or a compiled Help (.HxS) file.

-d

description

Specifies a description string for the collection.

-s

filename.HxS

Specifies the path to a compiled Help (.HxS) file to add to a collection.

-x

filename.HxI

Specifies the path to a compiled Help index (.HxI) file to register.

-q

filename.HxQ

Specifies the path to a merged query (.HxQ) file to register.

Incremental merges are not supported in this release.

-l

language ID

Specifies the language of the compiled Help file.

If this option is omitted, the default language for the Help file will be used.

-f

input filename

Specifies a text file that contains a set of commands to pass to Hxreg.exe. Any of the command switches for Hxreg.exe can be used.

-r

None

Specifies a namespace, or Help file, or alias to unregister.

-?

None

Displays the commands for HxReg.exe.

Example

The following example registers a namespace (myNamespace).

hxreg -n myNamespace -i myNamespace -c c:\myProject\myCollection1.hxc

The following example registers a compiled Help (.HxS) file (myCollection1) to myNamespace.

hxreg -n myNamespace -i myCollection1 -s c:\myProject\myCollection1.hxs

The following example unregisters a namespace (myNamespace).

hxreg -r -n myNamespace

The following example unregisters a compiled Help (.HxS) file (registered with the unique identifier myCollection1) from a namespace, leaving the namespace registered. It is not necessary to specify the path to the .HxS file.

hxreg -r -n myNamespace -i myCollection1

Remarks

HxReg.exe is intended for testing purposes only, and should not be redistributed.

In this version of Microsoft Help, if you wish to add a single compiled Help file to a registered namespace, you must pass the path of the .HxS file instead of the .HxC file when using the -c option. If you plan to add multiple .HxS files, pass the path for the .HxC file and add the .HxS files using the -s option.

If you are registering a Help title to a namespace with multiple Help titles, the unique identifier for the child collection (passed using the -i switch) must match the Id attribute value of the <HelpTOC> tag in the .HxT file for that collection. If these values do not match, the table of contents for the child collection will not be properly merged with that of the parent collection.

When choosing a namespace, it is recommended that you add a unique prefix for your company, followed by a period. For example, Microsoft documentation namespaces are registered using an "ms" prefix. Adhering to this convention greatly reduces the chances of namespace duplication.

See Also

Other Resources

Getting Started with Help Content and Integration

Help Authoring Reference