Blog

H3Viewer Build 118

posted Aug 29, 2013, 12:42 AM by Robert Chandler

Released Build 118 of H3Viewer. Includes the following updates since build 112...
  • 16-Nov-2011, 1.20 build 113
    • When F1 is pressed in VS 2010, if the URL we receive has an &LCID= parameter but no &Locale= we now append the equivalent &locale= to the end of the URL. This is what the MS SP1 help viewer does and this helps a user with a dysfunctional installation.
  • 30-Oct-2012, 1.20 build 115
    • Ctrl+Left = Focus the Navigation control
    • Ctrl+Right=Focus the Document browser control
  • 13-Mar-2013, 1.20 build 116
    • Address bugs when accessing MS Speech API. 
    • Added H3Viewer.ini switch AllowSpeech=n to switch off access
  • 16-Mar-2013, 1.20 build 117
    • Added extra debug for user reported bug.
  • 29-Aug-2013, 1.21 build 118
    • Update to Japanese translation.
    • Update to Traditional Chinese translation.

The Index

posted Feb 7, 2013, 4:52 PM by Robert Chandler   [ updated Feb 7, 2013, 8:10 PM ]

What are the differences between the various Indexes -- .HHK (HTML Help), .HxK (MS Help 2) and the embedded Help Viewer Index. The source to these examples can be downloaded at the end of this post.

Index Source

I've created this index using the FAR TOC/Index Editor...



HTML Help (.CHM)

Compiling to a .CHM I see pretty much the same as in my editor...  Just been sorted for me by the compiler

Notes:
  • The Popup item Titles come from my document <title> tags not the editor labels (not my editor text)



MS Help 2 (.HxS) -- VS 2002/2003/2005/2008 Help

Compiling to .HxS Help. Everything works much the same. 
  • My experimental links to 3rd level Keywords and to popup Keyword items failed (in fact the compiler didn't even include them).
  • In MS Help 2 the popup items show up in the "Index Results" pane. Even my 3rd level popup showed OK.



MS Help Viewer (.mshc) -- VS 2010, 2012

I used mshcMigrate.exe to export my HH project (.hhp) and H2 project (.HxC) to .mshc help.
Note I could also export .chm but the .hhp project file contains richer info (we can get to the index file data etc).

HV project migrated from HxC -- Displayed in VS 2012 Viewer

Here I've created a separate collection (See read me in the example zip) so we can see just our helps index items.
No big surprises.
  • KeyWord Links -- Not supported by HV
    Clicking the Links to Keyword items take you directly to the topic instead of moving the list selection to the target keyword. This is because HV does not support Linking to Keywords. And mshcMigrate does a work around by turning the Keyword Link into a normal link.
  • Popup Items -- The VS 2012 viewer shows a popup with current page checked.
    Again the popup items are populated by the topic <title> tags.
    Popups buried more than one level deep are not supported. The existing popups work OK.
  • 2 Levels Only 
    HV only supports 2 levels of index.
    You can see mshcMigrate has had to do some work in getting the Level 3 item to display at Level 2.



HV project migrated from HHP -- Displayed in VS 2012 Viewer

Here I got some strange results re popups -- which I will need to check out.
It could be because I included Level 2 and 3 popups etc. I would have expected the Indexes from HH and H2 to be the same.


Change VS Help CSS

posted Jun 13, 2012, 6:55 PM by Robert Chandler   [ updated Jun 13, 2012, 7:08 PM ]

Can I change the fonts / CSS of the VS 2010 help?

Many thanks MSDN forum user TechWill28 who posted me the following instructions on how to use your own CSS style sheet with VS 2010 Offline help content.

Hi Rob,

I've changed the branding-en-US.css to match the look of vs2005 help as closely as possible when viewing in normal text size. This means reduced header size, smaller verdana font for text, courier new for code samples, background of code samples in light blue and other details. I thought I'd share this with others.

Download Updated CSS file: http://williamsedb.dk/downloads/branding-en-US.zip  (also attached to this post). My own notes here: http://williamsedb.dk/h3viewer/how-to-make-vs2010-help-look-like-vs2005-help.htm

Instructions

The file 'branding-en-US.zip' contains just the stylesheet 'branding-en-US.css' and is 6 kB. To replace the original one do this:
1. Shut down LibraryManager if it's running.
2. Unzip branding-en-US.zip (downloaded above) to the same folder as dev10.mshc is in.
   (c:\program files\microsoft help viewer\v1.0\).
3. Open dev10.mshc with WinRar, WinZip or the like.
4. Replace the branding-en-US.css with the new one you just unzipped.
5. Close dev10.mshc.
6. Restart h3viewer.

If you use another language than English, you'll have to replace that stylesheet instead (eg. 'branding-de-DE.css' for German). The stylesheet will affect the way you see help in both HV1 and h3viewer, since h3viewer just uses the settings from HV1.

You do have an alternative: just choose another font in h3viewer, but that'll change the font for code samples as well, making them harder to read.


As an example here's what the help for the For..Each statement looked like in VS2005.



Here's what the same help will look like in VS2010 with h3viewer installed in the default setup.


And here's what it looks like when the modified stylesheet is applied.



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: http://vshelpdownloader.codeplex.com

    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.

    [csidl_localappdata]\Microsoft\HelpLibrary\HelpClient.cfg
    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" ?>
    <configuration>
      <appSettings>
        <!-- Valid values are: online, offline, enterprise -->
        <add key="helpmode" value="online" />
      </appSettings>
    </configuration>

    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.

    [csidl_localappdata]\Microsoft\HelpLibrary\HelpClient.cfg
    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

    [csidl_commonappdata]\Microsoft\HelpLibrary\HelpClient.cfg
    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:





    Using Catalogs as Filters - Pitfalls!

    posted Apr 12, 2011, 10:37 PM by Robert Chandler   [ updated Jul 18, 2011, 10:06 PM ]

    You may have noticed the new Filters page in H3Viewer. Multiple catalogs can be used to host multiple help systems. Flipping between catalogs providing a kind of pseudo filtering system. However if you update a help Book that is installed in several catalogs then the update will silently fail. Apart from that catalogs work well.

    Details

    When a help file (package) is installed into a catalog, only one copy is kept in the help store. All catalogs reference that one copy. Help Viewer 1.x installs will fail silently unless you first uninstall any old help from "all catalogs". Although the Help Library Manager "Update" page seems to do the Uninstall automatically for you as part of the update of Microsoft content (or maybe this is because MS content is signed?).

    But neither Microsoft nor 3rd parties are expecting content to be installed across multiple catalogs. Updates will fail if the content is installed in other catalogs. So please uninstall those particular books from the other catalogs before installing updates.

    Example: Updating MS help 

    Today I used 'Help Library Manager' to update "Help on Help" (HLM reported an update).
    I had more than one catalog containing 'Help on Help' so although the update was reported as a success, in fact it had failed and after the update the metadata.xml file in the data store still reported my 'Help on Help' was “Fri, 18 Mar 2011 21:12:44 GMT”.

    Once I removed 'Help-on-Help' from all catalogs and install it again, the metadata.xml file in the store reported a  new date of "Thu, 31 Mar 2011 01:12:12 GMT" and the .mshc file finally had new content.

    Summing Up

    Catalogs are not supported yet by Microsoft although the Microsoft guys don't see a problem with using them. As you see above there is fairly major problem you do need to consider if you do use multiple catalogs.

    The Golden Rule: 
    To update a book installed in more than one catalog, first remove that book from all catalogs (other than vs\100\*). If the book still does not update then also remove the book from the vs\100\* catalog.

    Last Note:
    For Help Viewer 1.0 and 1.1 there is currently no easy way to remove a catalog once you create one.

    VS SP1 (and New Help Viewer) Now Available

    posted Mar 9, 2011, 4:15 PM by Robert Chandler

    Hi all
    In case you missed it….

    VS SP1 is now available for download from MSDN Subscriber downloads and tomorrow as a public download. VS SP1 contains the new VS local Help Viewer. So no more browser based help. No more testing in all browser for compatibility.
    http://thirdblogfromthesun.com/2011/03/new-local-help-viewer-available-in-visual-studio-2010-sp1/

    Side Note: The latest H3Viewer.exe is compatible with the new help system and still contains several extra features.

    Rob

    New MS Help Viewer Beta

    posted Dec 9, 2010, 3:49 PM by Robert Chandler

    Today Microsoft released VS 2010 SP1 public Beta.
    It contains the new VS 2010 Help Viewer:

    PackageThis

    posted Sep 29, 2010, 7:30 PM by Robert Chandler   [ updated May 2, 2011, 9:10 PM by Robert Chandler ]

    Introduction

    PackageThis.exe allows you to select MSDN online content and package it into a help file (VS 2010 help, VS 200? help or .chm).

    Download from VS Gallery: PackageThis 
    (VS Gallery version now supports VS 2010 help files).

    Or download directly from the Patches area in CodePlex.
    CodePlex: PackageThis > SourceCode > Patches.
    (eventually this will be promoted to the official version)

          See Also Post: Language Packs for VS 2010 help.


    Package This Tour

    PackageThis.exe can be found in the \PackageThisGui\bin\Debug folder of the downloaded zip file.


    Unzip all files and run PackageThis.exe -- it takes a several seconds to connect to the server. 

    Make sure MSDN Library is selected (if that's what you want to package).

    Select the language you want to download:

    I like to first find the MSDN section (or sections) I need using the browser. 
    Here I'm interested in "Windows User Experience Interaction Guidelines".


    In Package This, you can either manually check each required page,
    or right+click a topic and choose "Select This Node and All Children...".


    I've selected "Select This Node and All Children...". The download will take some time so go and have a coffee.


    Finally your TOC branch items are now checked. The right side displays a log of pages downloaded. 
    Before packaging make any final selections.


    Now package the selected pages using the file menu. We want package to .mshc (VS 2010 Help).


    Specify the .mshc help file name and package install info.

    Product name and Book name will be displayed in Help Lib Manager when you install and uninstall.
    Important: For Vendor name don't use "Microsoft" as from this has a special meaning (see debugging below).


    Install the new help package using Help Library Manager.
    PackageThis 1.3.2 (or greater) can launch Help Lib Manager from the File menu.


    PackageThis allows you to override the default catalog (EG. For VS English the catalog name vs/100/en-us).



    When Help Library Manager opens, find your book and select "Add" then click the "Update" button.

    Important: You must first "uninstall" any old help first. Otherwise installation will appear to work OK but when you view help you will only see the old help.


    Viewing Help

    To view the help.... I'm going to use the Helpware H3Viewer (free app) to view VS 2010 Help.

    All .mshc help created with PackageThis appears under a toc node called "Package This".



    If you can view it then we are done!


    Debugging

    Not all installs go smoothly. Syntax errors in the help will result in an exception during installation.

    To view the details of the error I use the Helpware tool mshcMigrate.exe (free app) to read the error. Or you can open Windows Event Viewer.

    I got this error when I used a Vendor name = "Microsoft". Don't use this name as it expects a signed file.

    An error occurred while updating local content: Microsoft.Help.CacheLib.CacheLibNonCabPackageFoundForMSFTException: Exception of type 'Microsoft.Help.CacheLib.CacheLibNonCabPackageFoundForMSFTException' was thrown.
    ....


    Unfortunately MS Help Viewer 1.0 reports errors but not the name of the HTML file that contains the error.
    So we must unzip the help file and use a XML syntax checker.

    You can use the Helpware tool mshcMigrate.exe to syntax check the files.

    On the second tab specify:
       a) the folder of files you want to check...
       b) the .mshc to zip the files to once checked.


    Running Help Library Manager

    If you have .mshc help package & HelpContent.Setup.msha manifest file (used to install) we use Help Library Manager to install help.

    Note: For Help Viewer 1.0 the install manifest must have the name "HelpContentSetup.msha".

    A quick side tour: 

    Open HelpContentSetup.msha in notepad.

    Here we see the installation instructions. Notice in the "package-list" section, you could add more packages. Feel free to edit this file.

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head />
    <body class="vendor-book">
    <div class="details">
      <span class="vendor">MSDN</span>
      <span class="locale">en-us</span>
      <span class="product">PackageThis_UXGuidelines</span>
      <span class="name">PackageThis_UXGuidelines</span>
    </div>
    <div class="package-list">
      <div class="package">
        <span class="name">UXGuidelines</span>
        <span class="deployed">true</span>
        <a class="current-link" href="UXGuidelines.mshc">UXGuidelines.mshc</a>
      </div>
    </div>
    </body>
    </html>
     

    Note: The .mshc help file is just a renamed ZIP file and contains all the topic HTML and images files.
      If you need to fix a bug in help you can rename to .zip and decompress this file (just like you can with 
      Word .docx files).

    Installation Continued

    Run Help Lib Manager as administrator.

    Important notes:
    • Always run HLM as Administrator when installing help (required for unsigned help).
    • Always uninstall help before installing new help (if old and new have the same file\product\book name).



    When Help Library Manager appears, select "Install content from disk".


    Select your help manifest file and click Next

    The rest of help install is as listed above.


    H3Viewer 1.4 (Build 71)

    posted Sep 20, 2010, 7:44 PM by Robert Chandler   [ updated Sep 21, 2010, 3:33 AM ]

    H3Viewer 1.4 contains many user requests (If you have a feature please contact us).

    Download H3Viewer 1.4
    • Mouse Wheel clicks
      Can now click links with the middle button to open a topic in a new tab.
    • Support for MS Intellimouse
      We now support the extra MS Intellimouse side buttons (WM_XBUTTONUP events). They perform Browser Back and Browser Forward same as in Google Chrome. Also Hold down Ctrl to change page tabs.
    • Ctrl+w 
      H3Viewer uses Ctrl+F4 to close page tabs. You can now also use Ctrl+w (same as IE8).
    • Table Of Contents cleanup
      We now restrict the TOC to show only Visual Studio 2010 content. Previously we displayed all raw data returned by the API call, which was not always helpful. We are following MS on this (watching as they build their full TOC experience).
      • ShowTocMode=n in H3Viewer.ini
        Set 
        ShowTocMode=y if you want to see the original raw unfiltered TOC. Set =y then restart H3Viewer. You will now see 3 new menu items in the TOC (right+click) context menu.
    • Open Online command
      You can now specify the device view and language via an options dropdown.
      Also you can now click Open Online for MSDN web pages (not just local help content).
    • Font command
      This new browser toolbar button allows you to override the default font of a page (see below).
      The fonts are defined in
      H3Viewer.ini if you want to modify the list.
    • Other changes
      • Now allow MS Help Viewer 1.1 CTP Beta to show in menus, but not the earlier incarnation of MS Help Viewer Power Tool (We still display a warning popup for that).
      • Added French translation -- by Julien Lebosquain - See blog.lebosquain.net (many thanks Julien!).
      • TOC control now uses Win 7 type expando triangles (was old fashioned +\- buttons). Tweak other UI elements for minimal look.





    Help Viewer 1.0 SDK

    posted Sep 9, 2010, 7:42 PM by Robert Chandler   [ updated Feb 11, 2016, 8:56 AM by Robert Chandler ]

    Sept-2010 - Microsoft have release Help Viewer 1.0 SDK

    In the SDK you will find documentation on the workings of MS Help Viewer 1.0. Also some undocumented C# source code to help you do things like get the session number for a help URL etc.

    Further Reading

    This site contains extra info not found in the SDK.

     

    1-10 of 75