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 firstname.lastname@example.org!
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 <divclass="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>
<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>
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 email@example.com!
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.
Well, I have a partial anwser that at least gets rid of the tab from the tab strip.
One really nice feature about the new viewer is that I can "rip" tabs off the tab strip into their own window, much as I can do with code files in Visual Studio. Nice!! That will come in handy. Thanks for this.
So, one way around having that tab open all the time is to re-dock the tab to one of the dockable/collapsible content panes (e.g. like the dock pane at the bottom of the main content window) and untick the pushpin so that it's collapsed by default.
Then, the next time you start Help Viewer 2.0, the Manage Content "tab" will be appear where you last positioned it (e.g., in the example above, in a collapsed dock window at the bottom of the main content window).
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.
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.
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:\LocalMSDN2012\HelpContentSetup.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!
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
That is a very useful info. Can "msha" that has signed cab be installed in VS the same way?