Blog‎ > ‎

Move or Reset your VS 2010 help Library

posted Apr 29, 2011, 5:10 AM by Robert Chandler   [ updated May 10, 2011, 8:45 AM ]

Help Viewer 1.x (VS 2010 help) does not yet officially support moving your local help library, however it’s easy to do (if you are comfortable tweaking the registry and editing files in the protected area of your hard disk… Which most developers are).

Moving the VS 2010 Help Library

    1. Shutdown "Help Library Agent" tray application (right click the icon and select "Exit")
    2. To find the current path of the help library store either:
      • Run Help Library Manager (via “Help > Manager Help Settings” menu in VS 2010) and click "Choose online or local help".
      • Or look at registry value "LocalStore=" in HKLM\Software\Microsoft\Help\V1.0\
      • The default install path is %ALLUSERSPROFILE%\Microsoft\HelpLibrary\
    3. Move the help library store to the new location.
    4. Update the registry value "LocalStore=" in HKLM\Software\Microsoft\Help\V1.0\ with the new path.
    5. Open <HelpLibraryPath>\manifest\queryManifest.??.xml in notepad and rename all occurrences of the old help path to the new path.
I've tested this several times and had no problems.

    Resetting Help Library Content & Location

    Note that you can blow away (delete) your Library content and at the same time set a new library location. Here's how to reset help:

      1. Kill off Agent tray app and delete your current library folder (including all content under it). 
      2. Now edit the file C:\Program Files\Microsoft Help Viewer\v1.0\HelpLibManager.exe.config 
        and set...<add key="FirstTimeRun" value="True" /> 

    Next time you run Help Library Manager you will be prompted for a new library location (accept the default path or enter a new path). The new library will initially contain just Help On Help, which is automatically added to any new help catalog.

    Copying a Library Between PCs

    If you have several PCs and want to save bandwidth, you can use the information above to copy the entire library from one PC to another. To save further bandwidth, only allow one PC to receive help updates (using Help Library Manager) then when you want to, simply xcopy the updated library to the other PCs.

    For both PCs with Identical Library paths (recommended):
    1. Shutdown "Help Library Agent" tray application on both the source and target PCs.
    2. Xcopy the Library folder (as we did above) to the correct location on the target PC.
    If the source and target PCs have different Library paths (maybe XP and Win7?) you then need this additional step:
    1. Carefully modify <HelpLibraryPath>\manifest\queryManifest.??.xml (as we did above) so that it contains the correct Library path (ie. Reflects the final location and not the original location).

    Installing New Help Content

    Run Help Library Manager (see VS 2010 Help menu) to install new help content.

    If you have a VS 2010 installation DVD click "Install content from disk" and browser to the "\Product Documentation" folder on your VS install DVD. If you are using VS 2010 Express (and don't have a DVD) click "Install content from online".

    Once installation has completed click "Check for updates online" to get the latest revisions of help.

    VS Help Downloader: Downloader International Help

    Alexandr Kozlenko (SDE, Lime Systems) wrote a nifty utility for downloading any locale version of Visual Studio 2010 help:

    Use H3Viewer to flip between your different language versions of help. H3Viewer also allows VS F1 help to display in the selected language.

    Package This: Package Your Own MSDN Help

    Only a small portion of MSDN Online is available as a download for VS 2010 local help. However another interesting CodePlex project called "PackageThis" allows you to package any part of MSDN (down to the topic level) to any form of Microsoft help file (.chm, .HxS or .mshc).

    To use PackageThis:
    1. Download PackageThis (VS Gallery has a VS 2010 help compatible version).
    2. Run PackageThis.exe. After several seconds connecting to the server, the treeView will display a checked list of MSDN topics (it should look the same as the MSDN online TOC).
    3. If required select a new locale and library from the main menu.
    4. Use the treeView [+][-] keys to locate the MSDN section of interest (I find it handy to have MSDN online open in my web browser at the same time).
    5. To check (and down) all topics in a section, right-click the treeView section of interest and choose "Select this node and all children". This will check and download the topic and all it's sub-topics. Then go have a cuppa while it all downloads. 
    6. Repeat the last 2 steps if you want to include other sections.
    7. Finally select "File > Export to Mshc File" to package all topics to a .msha help files, and create the .msha manifest file (used to install help). Don't use the Vendor name "Microsoft" as this has special meaning.
    8. Run "File > Install Mshc Help File" to run Help Library Manager and install your new help. 
    Note: You can use H3Viewer (free app) to view foreign language help (as VS 2010 Help Viewer v1.1 is locked to your installed locale).

    Flip between Online and Offline Help without Help Library Manager

    Help Library Manager is used to switch between Online and Offline help modes. HlpViewer.exe reads this setting to decide if offline mode is valid (but if first checks if Agent is running in memory).

    Many people ask where the Online/Offline Mode is stored. 
    It is stored in a UTF-8 XML file called HelpClient.cgf. If you are careful you can read/write to this file as well.

    Writing Online/Offline Mode

    In Help Viewer 1.1 Help Library Manager code writes the Online/Offline Mode setting to this file.

    Win7: c:\Users\<user>\AppData\Local\Microsoft\HelpLibrary\HelpClient.cfg
    WinXP: C:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\HelpLibrary\HelpClient.cfg

    If the directory or HelpClient.cfg is not found it creates the file by taking a copying the installed template file.

    c:\Program Files\Microsoft Help Viewer\v1.0\HelpClient.cfg

    <?xml version="1.0" encoding="utf-8" ?>
        <!-- Valid values are: online, offline, enterprise -->
        <add key="helpmode" value="online" />

    Valid settings are currently "online" (default) and "offline". The "enterprise" option although defined is not currently used.

    Reading Online/Offline Mode

    The Viewer code first checks for a HelpClient.cfg at the usual location.

    Win7: c:\Users\<user>\AppData\Local\Microsoft\HelpLibrary\HelpClient.cfg
    WinXP: C:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\HelpLibrary\HelpClient.cfg

    If not found the HV 1.0 (VS RTM) version checks this location

    Win7: c:\ProgramData\Microsoft\HelpLibrary\HelpClient.cfg

    If not found the HV 1.1 (VS SP1) checks the default template file HelpClient.cfg in the Runtime EXE folder.

    c:\Program Files\Microsoft Help Viewer\v1.0\HelpClient.cfg

    and defaults to "online" if none of the above are found.

    HV 1.1 Source Code

    You can see the relevant read\write HelpLibraryManager.exe code here.

    You can see the relevent read code for HlpViewer.exe here: