Partager via


Installing Content From Downloaded Help Viewer 2.0 cabs

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="https://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) https://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="https://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!

Comments

  • Anonymous
    August 24, 2012
    Well, VS2012 has RTM'd, along with Help Viewer 2.0. I have downloaded/installed all the help content I want available locally, so now, how do I turn the Manage Content tab off? It's really annoying that it's always there, as I don't always need it.

  • Anonymous
    August 24, 2012
    The comment has been removed

  • Anonymous
    August 24, 2012
    It's a bit jarring to have the VS2012 dark theme and then, when viewing help content, it's on a stark white page. Perhaps you guys could cook up some CSS for those of us who are using the Dark theme in VS.

  • Anonymous
    August 24, 2012
    Thank you for the comments! We considered applying themes to topic CSS, but ultimately decided against it - it just felt like it was going a little far, as the content would have a different look and feel online if we did that. We also have content coming from many sources within Microsoft and could not guarantee it would work right for all content scenarios with the resources we had. In any case, I'm sure the team will keep an eye on the feedback on this and consider for a future release. Happy coding!

  • Anonymous
    September 26, 2012
    Hi everyone, i want to suggest a new scheme to make msdn-2012 library installation portable: (All we need are - IE, Notepad and DownloadMaster)

  1. Open URL "services.mtps.microsoft.com/.../en-US" in IE. (you can choose your own locale e.g. ru-ru, fr-fr...)
  2. After page was loaded -> right mouse click -> "View HTML Code". HTML editor window will appear. Choose menu option "Save file" -> just name it "HelpContentSetup.msha" and save it into local folder e.g. "C:LocalMSDN2012". Close "HTML editor".
  3. Again, right mouse click on the same page -> "Download all by DownloadMaster". (DownloadMaster should be instaled befor, it's freeware)
  4. You'll see DM-window. Apply filter only for CAB-files. So you should see only cab-files are selected. Start downloading into same local folder "C:LocalMSDN2012". Approximately all files from Catalog for one locale about 6,5 Gb.
  5. Now, while downloading, lets make setup file "C:LocalMSDN2012HelpContentSetup.msha" portable. Open it in Notepad and replace all "packages.mtps.microsoft.com/" by "" - empty string. Also replace all "../../packages/" by "" - empty string. Save HelpContentSetup.msha - it's ready.
  6. Wait until all CABs were downloaded. So at the end you should have a "C:LocalMSDN2012" folder contained HelpContentSetup.msha and *.CAB - files.
  7. Portable instalation of MSDN 2012 Library is ready. PS. If you wish - you can create an ISO - image or burn it to the DVD9. Enjoy!
  • Anonymous
    April 07, 2013
    Have a look to this web link (http://mistergreen.voila.net), you'll find a software to rebuild, automated way, the Help Viewer 2 Content Setup file: HelpRefactory version 2 go http://misterjam.voila.net go htto://mistergreen.voila.net

  • Anonymous
    September 18, 2015
    That is a very useful info. Can "msha" that has signed cab be installed in VS the same way?