There's been a fair amount of discussion both in private emails and on the MSHelp3 Yahoo! group about the pros and cons of requiring signed .cab files for silent installs with the new Help system.
As anyone who's been using Vista and Windows 7 knows, security is a pretty big deal these days despite all the headaches people feel it causes. Without security, you'll have even bigger headaches before you know it!
Before long I will be posting some background on some of our thinking around this requirement. In the meantime, however, I wanted to make sure that those who have need of some of the basic details around signing their cab files have access to the general details.
In addition, I'm providing some information about what you can do to test this out without having to purchase a certificate - you can create your own test certificate, which you can use for signing purpsoses on your own machine.
Here's a page (again in the Links section, as well) describing the basic process. Have fun!
I have a Sandcastle project that generates VS2010 help (.msha and .mshc files), and I am trying to have these installed with the HelpLibraryManagerLauncher.exe application, specifying the /silent switch.
Now, I have created a .cab file and had it signed, and changed the references within the .msha file to point to this new cab file. Here is the command I execute:
HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /silent /brandingPackage Dev10.mshc /sourceMedia MyHelp.msha
Well, even though the application exits with a "success" exit code, the Event Log tells a different story:
An unexpected error occurred on startup: System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.Help.Manager.Models.CacheProvider.GetAvailableBooksFromMedia(String path, Action`1 availableBooksCallback)
at Microsoft.Help.Manager.AppLifecycle.SilentInstallFromMedia(String sourceMedia, IList`1 mediaBookList)
at Microsoft.Help.Manager.AppLifecycle.InstallMainContent(CommandLineParser parsedArgs, Boolean fromAsyncCallback)
at Microsoft.Help.Manager.AppLifecycle.StartWithSilent(CommandLineParser parsedArgs)
at Microsoft.Help.Manager.AppLifecycle.Start(CommandLineParser parsedArgs)
at Microsoft.Help.Manager.App.OnStartup(StartupEventArgs e).
Running the command without the /silent switch works just fine.
So, what could be causing this? It should be noted that I intend to have this entire process automated:
1. Create help with Sandcastle
2. Create .cab of .mshc file with makecab.exe
3. Sign cab file with signtool.exe
4. Edit .msha file to point to the cab file
5. Use HelpLibraryManagerLauncher.exe to silently install help
Finally, I think it would be quite advantageous to have Sandcastle create the .cab file and update the .msha file accordingly. It would be great to have that functionality in the next release! :-)
Please let me know what I could be doing wrong.
Hello Sam - the #1 thing you need to fix is to ensure that your .msha file is named "HelpContentSetup.msha" - it's an issue on our side, but that is only .msha file name we currently allow.
I've figured out that the reason for the System.UriFormatException was because I had not provided the full, quoted path to the .msha file - once I did so, the HelpLibraryManagerLauncher happily installed silently.
All three files - the .msha, .mshc and .cab files - are all named correctly. :-) They do not seem to require the "constant" name of "HelpContentSetup"; my files are named differently.
One thing I did notice was that if the help has already been installed, then an error is thrown during a subsequent installation. It would be great if HelpLibraryManager either updates the existing help with the newer version, or uninstalls and then reinstalls the help.
Hmmm... Interesting. You stumbled on an inconsistency in our code logic - your .msha file name being different than HelpContentSetup.msha will only work in Silent Mode installs. If you try that with Interactive Mode the 'Next' button will not be enabled.
For our next version of Help Viewer we are looking at supporting help updates from disk - currently they are principally only supported from the web, which is restricted to our content, unfortunately. We're working on expanding support for partner content scenarios.
All the best,
I made a pass at this problem this evening as I have the exact same goal: an unattended installation of the help files I created with Sandcastle. I get the part about having to package things up in a CAB file, but I can't find the SDK; all the links appear dead.
Would you be good enought to tell me where you got the SDK and the steps you used to generate the CAB? I'm an engineer, damnit, I should be programming now instead of packaging up help files. Thanks in advance.
Hello Don, please send me an email using the Email Blog Author option and I will forward you some details about how to work through the issue. I will also work on a blog post with updated details soon, but want to get you unblocked first.
i want to install Sandcastle Helpviewer Silently using setup...
when i used Silent keyword its not installing but when i removed it installed propery but showing GUI of Installation ...
rc= WshShell.run ("HelpLibraryManagerLauncher.exe /product VS /version 100 /locale en-us /Silent /brandingPackage Dev10.mshc /sourceMedia HelpContentSetup.msha",0,True)
i Dont want show my GUI window