Archive: Nit: MUI documentation as installed


Nit: MUI documentation as installed
When the NSIS documentation is installed locally, I'm encountering a script error when clicking on

2.5 Modern UI
<<Modern UI Examples>>

I believe this works on the web, but something was perhaps overlooked in the HtmlHelp workshop (.hhp?)

Or am I doing something wrong?


I see the same problem. I am guessing that IE places restrictions on what shell open actions can be performed within a CHM file.
IMHO, this link needs to be removed from the documentation if it is going to be problematic.


Maybe, but other links work. I've built HtmlHelp .chm files, and the cause is typically something being left out of the .hhp, .hhc, or .hhk file ... if HtmlHelp Workshop or equivalent was used.

I took a look in CVS for the original (and maybe submit a patch), but didn't find them (may have been looking in all the wrong places.)


The other links open files. The one that fails opens a folder. What is failing is the shell open call with the folder as the parameter.
Nothing was left out from the hhp. The same code is used for both the web as well as the chm help.
IMHO, it would be better if that link actually pointed to:
../Docs/Modern UI/Readme.html#examples.


What exactly did you do to get this error? It always works for me, even with all security zones set to high level.


Open the NSIS.chm file, go to section 2.5 and click on the "Modern UI Examples" link.
The attached error is seen.


That works just fine for me. There's also a try-catch block around that code to make sure this kind of messages don't come up. What might have you done differently? What OS do you use? What version of IE?


Windows XP Pro SP2
IE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
128 bit encryption
I am not quite sure why the error is being thrown. I debugged it using the MS script debugger and the problem is occurring with the ActiveXObject "Shell.Application".
BTW, there is no try catch block around the area where it is failing.
This is happening in chmlink.js and the problem line is 84:


if (FolderExists(lfn))
{
var objShell = new ActiveXObject("Shell.Application");
objShell.Open(lfn);
}


Perhaps you should call TryShellExec instead of directly trying to open the folder?

I think it didn't work with TryShellExec, but I'm not sure. Want to give it a shot? I still can't reproduce this...


I will give it a shot.
And, oh, BTW, clicking on the same link on the NSIS web site help docs results in a 403 error:

Forbidden
You don't have permission to access /Examples/Modern UI/ on this server.

Apache/1.3.33 Server at nsis.sourceforge.net Port 80

Thanks, fixed.


Well... it kind of works- the folder opens within the CHM browser instead of externally.
Let me investigate further.


After some playing around, I can't get it to work.
I think it may be related to Windows XP SP2 which added more stringent security wrt to scripting.
However, browsing to file:///../Examples/Modern%20UI does work.
I still feel that changing the link to
../Docs/Modern UI/Readme.html#examples would be a better idea, since this would also work on the NSIS web site.
[edit]
I see you fixed the web site, so maybe we continue with what we have now, except that you fall back to navigating to the file:/// URL if the shell open fails.
[/edit]


I have XP SP2, that's not the problem.

I can live with it falling back to opening the folder in the CHM window.


These may be relevant re Local Machine Zone Lockdown:

http://msdn.microsoft.com/security/p...llockdown.aspx

http://msdn.microsoft.com/security/p...wn_devimp.aspx

http://weblogs.asp.net/jgalloway/arc...20/218123.aspx

I've wondered if HtmlHelp developers may be prone to encounter this hassle. And whether the end-users would experience problems with WinXp-SP2.

There are references to "mark of the web" comments that seems to be a work-around.