VSdocman is shipped with small command line tool HelpLibManagerLauncher.exe which helps to install and uninstall MS Help Viewer documentation on a target machine with MS Help Viewer 1.x installed. It simply calls Help Library Manager (HelpLibManager.exe) but before this, it performs some preprocessing. HelpLibManager.exe is a part of MS Help Viewer 1.x runtime and it is used for installing and uninstalling the help packages. See a full list of command line parameters for HelpLibManager. HelpLibManagerLauncher.exe takes exactly the same command line parameters. So why not use directly HelpLibManager.exe? Here is a list of additional tasks performed by HelpLibManagerLauncher.exe:

1.It finds path to HelpLibManager.exe. It reports situation when it is not found which means that MS Help Viewer runtime is not installed.

2.It detects if HelpLibManager.exe is already running. If yes, it reports this problem and a user must close it first.

3.It detects installed locale of specified catalog. The /locale parameter is required for both, installation and uninstallation in HelpLibManager.exe. For English VS help it is en-us but we cannot rely on it. There are various language versions of VS help or any other help catalog. HelpLibManagerLauncher.exe doesn't require /locale parameter. If this parameter is omitted, program automatically finds installed locale of the catalog. This is recommended usage.

4.When installing, the HelpLibManager.exe needs to "run as administrator". This is not necessary when uninstalling. The utility handles this properly.

The utility waits until HelpLibManager.exe finishes and returns the same exit code as HelpLibManager.exe. Additionaly, it provides several new exit codes.

Syntax

HelpLibManagerLauncher.exe parameters

Command Line Parameters

Parameter

Description

/product

The product code. Ex. vs.

/version

The product version being installed. Ex. 100.

/locale

The product locale being installed. Ex. en-us.

/silent

Perform the installation without prompting the customer or displaying any UI. Digitally signed cab files are required for silent installation - .mshc files that are not deployed in signed cabs cannot be installed silently. When run in silent mode HLM writes a log file to the %Temp% directory.

/content

Required if the /silent argument is present and /uninstall is not present. This specifies the location for the local content store if one has not been previously set. It is ignored if the content store location is already defined.

/brandingPackage

The file name of the branding package for the content. The branding package is an optional component that customizes the content presentation. This argument is ignored if the product already has a branding package defined.

/sourceMedia

The content installation file helpcontentsetup.msha. If the specified file is not found or is invalid, the /sourceWeb argument is used.

/sourceWeb

The URL that defines the location of content that can be downloaded and installed.

/mediaBookList

When not combined with /uninstall, this argument specifies the books to install. This argument is valid only for silent installs. If this argument is not specified, all books in the /sourceMedia file are installed. Values specified for this argument match the file names that describe each book on the media (book1.html, book2.html etc.)

 

When combined with /uninstall, this argument specifies the names of the books to be uninstalled. Use double quotes (") around books names that contain spaces and use a space as the delimiter for a list of books. This argument is required when /uninstall is specified.

/webBookList

Specifies the books to install. This argument is valid only for silent installs. If this argument is not specified, all books found at the /sourceWeb endpoint that match the /locale argument are installed. The book list values are fully qualified; they are not relative based on /sourceWeb. Separate URLs using a space.

/uninstall

Specifies that books should be removed from the local content store. This argument requires the /silent, /productName, /mediaBookList and /vendor arguments are present.

/productName

Specifies the product name for the books that will be uninstalled. The product name is identified in the helpcontentsetup.msha or books.html files that shipped with the content. An uninstall operation can remove books only from a single product - to remove books from multiple products requires multiple uninstalls.

/vendor

Specifies the vendor for the product content to be uninstalled.

Exit Codes

Original codes returned from HelpLibManager.exe:

Code

Description

0

The operation was successful.

100

One or more command line arguments was missing or invalid.

110

The application configuration file for HLM was missing or invalid.

120

The help content store could not be locked for update. This error typically occurs when the content is locked for update by another process.

130

Files required to install content for a new product were not found.

131

Files required to install content for a new product were invalid.

140

The path specified for the /content switch is invalid.

150

The local content store is in an invalid state. This error occurs when the directory permissions do not allow writing, or a required file is missing from the directory.

200

The arguments passed to HLM did not result in content being installed. This can occur when the content is already installed.

400

The removal of content failed. Detailed information can be found in the event log and in the installation log.

401

The installation of content failed. Detailed information can be found in the event log and in the installation log.

402

Non-admin trying to initialize the store using /silent switch.

999

An unknown error occurred.

Additional codes returned from HelpLibManagerLauncher.exe:

Code

Description

1

Couln't find HelpLibManager.exe.

2

An unknown error occurred.

3

HelpLibManager.exe is already running. You need to close it in order to register  the help.

4

Local help library store was not initialized. You need to install some help first (e.g. VS help) in order to register your help.

5

Missing some command line argument.

6

Specified help catalog (product+version) is not installed. The new catalog couldn't be created because no /locale argument was supplied.

Remarks

When deploying your MS Help Viewer documentation you need to install it on the target computer. All you need is to include and call this utility with proper parameters from your installation program. VSdocman automatically generates BAT files with correct parameters for installing and for uninstalling. You can call them directly or copy the code from them.

Distribution Policy

You can distribute your documentation with HelpLibManagerLauncher.exe utility only if you are registered user of VSdocman. You cannot distribute HelpLibManagerLauncher.exe if you are using evaluation (trial) or beta version of VSdocman.

Registered users can distribute HelpLibManagerLauncher.exe royalty-free but only with documentation generated by VSdocman or with documentation which contains parts generated by VSdocman.

See Also