The Help Guy

April, 2012

  • The Help Guy

    Installing Content From Downloaded Help Viewer 2.0 cabs

    • 6 Comments

    Today I have a guest post from my good friend and co-worker in the Help Viewer team, Malcolm Dickson. Malcolm describes how you can create a 'local' means of installing content for scenarios behind firewalls or where there is no Internet connectivity. It still requires the ability to download content as the initial starting point, but allows you to create your own install script from downloaded content. Send your comments to hlpfdbk@microsoft.com!

    ================================

    Installing Content From Downloaded Help Viewer 2.0 cabs

    This is a very simple and quick tutorial for creating a Help Viewer 2.0 MSHA. The MSHA is an XML file that describes a set of cabs. Help Viewer 2.0 can read the MSHA to obtain a list of content (the .CABs) available for local installation.

    This is only a primer describing the very basic XML schema for the Help Viewer 2.0. There are additional elements which can be contained within the MSHA which this primer does not describe. For further information, reference the Help Viewer SDK (scheduled release date is TBD).

    Note that there is an example implementation below this brief overview and sample HelpContentSetup.msha.

    The name of the MSHA, for the purposes of this primer, must be HelpContentSetup.msha. The reason for this is that by default (the default installation), when looking for content on a local resource (local drive or folder) Help Viewer 2.0 looks for a file named HelpContentSetup.msha. HelpContentSetup.msha (example below) should contain a list of the cabs available. An easy implementation is to simply download the desired cabs to a folder, create an HelpContentSetup.msha (modified version of the below) and save that MSHA to the same folder that contains the downloaded .CABs. For each CAB, there should be a <div
    class="package">…</div> (see example below). 

    One last note – in the implementation example below, we have included the branding package cab. This is critical to include in order to get the needed Visual Studio content rendering elements and content behaviors. 

    Sample HelpContentSetup.msha file (replace “cab name 1” and “cab name 2” etc. with the file names of the downloaded cabs):  

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head />
    <body class="vendor-book">
        <div class="details">
            <span class="vendor">Microsoft</span>
            <span class="locale">en-us</span>
            <span class="product">Microsoft Help Content</span>
            <span class="name">Microsoft Help Content</span>
        </div>
        <div class="package-list">
            <div class="package">
                <span class="name">cab name 1</span>
                <span class="deployed">False</span>
                <a class="current-link" href="cab name 1.cab">cab name 1.cab</a>
            </div>
            <div class="package">
                <span class="name">cab name 2</span>
                <span class="deployed">False</span>
                <a class="current-link" href="cab name 2.cab">cab name 2.cab</a>
            </div>
        </div>
    </body>
    </html>

    Example Implementation: 

    1. Create local folder, something like “C:\SampleDownloadedContentCabs”
    2. Download desired cabs to the above folder:
      1. Launch browser, Go to (copy and paste the following URL into the browser
        address field) http://services.mtps.microsoft.com/ServiceAPI/catalogs/visualstudio11/en-us
      2. Download (select and save to folder created in step 1):
        • v2visual_studio_2011_fundamentals_b906_vs_110_en-us_1(7df9cab6-4c1c-e5cc-5149-26f71459df93).cab
        • v2visual_studio_2011_fundamentals_b906_vs_110_en-us_4(f881d128-d84e-70a7-989a-8b5a4808977b).cab
        • VisualStudio_2011_Branding_en-US(08b345ee-bab5-517b-36cc-e0c486ca3962).cab
    3. Create the below HelpContentSetup.msha as a txt file (I used Notepad to create the file) and save it to the above noted folder (see step 1) .
      1. Note that the class “name” value is the name of the cab file downloaded without the GUID (the string of characters within the parenthesis). This is important because the installation system uses this name to match the MSHC contained within the downloaded cab.
      2. Note that the class “Branding” exists and is unique.  The Branding cab is included in this primer so that the installed content will have branding, and the content behaviors that are contained in the downloaded cabs will have the appropriate support elements contained in the branding package cab.  Without this, errors will result when the system looks for support items that are not part of the ripped (installed) content.

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head />
    <body class="vendor-book">
        <div class="details">
            <span class="vendor">Microsoft</span>
            <span class="locale">en-us</span>
            <span class="product">Microsoft Help Content</span>
            <span class="name">Microsoft Help Content</span>
        </div>
        <div class="package-list">
            <div class="package">
                <span class="name">v2visual_studio_2011_fundamentals_b906_vs_110_en-us_1</span>
                <span class="deployed">False</span>
                <a class="current-link" href="v2visual_studio_2011_fundamentals_b906_vs_110_en-us_1(7df9cab6-4c1c-e5cc-5149-26f71459df93).cab">v2visual_studio_2011_fundamentals_b906_vs_110_en-us_1(7df9cab6-4c1c-e5cc-5149-26f71459df93).cab</a>
            </div>
            <div class="package">
                <span class="name">v2visual_studio_2011_fundamentals_b906_vs_110_en-us_4</span>
                <span class="deployed">False</span>
                <a class="current-link" href="v2visual_studio_2011_fundamentals_b906_vs_110_en-us_4(f881d128-d84e-70a7-989a-8b5a4808977b).cab">v2visual_studio_2011_fundamentals_b906_vs_110_en-us_4(f881d128-d84e-70a7-989a-8b5a4808977b).cab</a>
            </div>
            <div class="package">
                <span class="packageType">branding</span>
                <span class="name">VisualStudio_2011_Branding_en-US</span>
                <span class="deployed">True</span>
                <a class="current-link" href="VisualStudio_2011_Branding_en-US(08b345ee-bab5-517b-36cc-e0c486ca3962).cab">VisualStudio_2011_Branding_en-US(08b345ee-bab5-517b-36cc-e0c486ca3962).cab</a>
            </div>
        </div>

    </body>
    </html> 

     

    1. The folder created in step 1 should now contain:
      1. The 3 cabs downloaded in step 2 above
      2. HelpContentSetup.msha created in step 3 above
    2. Launch Help Viewer 2.0, select the Manage Content tab, and select the Disk button under “Installation source:”
    3. Browse to the folder created in step 1 above, and select the HelpContentSetup.msha txt file created in step 3 above.
    4. You should see a list of content to install. In the Action column, select add, which should create an entry in the Pending changes field. 
    5. Once you have selected all the content you want to install, select the Update button, which will install the content to your local store (this last step will require local machine Administrator privileges which you will be prompted for during the installation process). 

    Summary – Using and extending the above steps will enable the downloading of cabs to a local folder. In addition, an MSHA which describes the downloaded cabs (per the above) will enable installation of local Help content. This can be useful for customers who want to create DVDs of local Help content, customers behind proxy servers, and customers who manage networks where clients do not have access to the Internet. Note that the above is only a very simple start. The MSHA file has additional support elements, content can be packaged in MSHC’s, and branding packages can be extended. All these features of the Help 2.0 system will be defined in the forthcoming Help 2.0 SDK.

    Please send feedback to hlpfdbk@microsoft.com!

Page 1 of 1 (1 items)