Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 4 Jahren, 8 Monaten
Letzter Beitrag:
vor 4 Jahren, 7 Monaten
Beteiligte Autoren:
kimor, GuenterP, Alexander Predl

[SOLVED] WD 18 Empty Help File on UNC path

Startbeitrag von kimor am 24.11.2013 21:53

I have a program that runs from a UNC path. When opening the help file it shows the main index but the content is empty. When moving the help file locally it shows as it should.
A rights problem?



Re: WD 18 Empty Help File on UNC path

Hi again,
I figured that I could move the help file to the documents-folder on the clients computer and then read it from there:

CopyHelp is boolean
CopyHelp = fCopyFile("\\msli017v\dokument\Program\LIBB\Hjälp för LIBB017.chm", "SysDir(srMyDownloads)" + ["\"] + "Hjälp för LIBB017.chm")

SWITCH Nation()
CASE nationSwedish: ShellExecute("SysDir(srMyDocuments)" + ["\"] + "Hjälp för LIBB017.chm")

The file is according to CopyHelp variable (True) copied to the folder, but it's not. The file is still opened and still the same problem, no content.



von kimor - am 30.11.2013 08:18

Re: WD 18 Empty Help File on UNC path


sure this don't work on Windows XP and above, because of a security hotfix from Microsoft.

On my Computer I tested and it worked, here is the solution:

Open regedit.exe


If the registry subkey "ItssRestrictions" does not exist, create it.

You can copy the code, paste it in a file named: "help_unc_enable.reg", save the file, double click on it and add it to the registry.

Source: http://www.helpscribble.com/chmnetwork.html


von Alexander Predl - am 30.11.2013 21:47

Re: WD 18 Empty Help File on UNC path

Hi Alex,

Yes I've seen the restriction Microsoft put in make things complicated... :mad:

I tried this:
ResExist, ResCreateKey, ResWrite is boolean
ResExist = RegistryExist("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions")
IF ResExist = True THEN
Info ("Key found!")
Info ("Key NOT found!")
ResCreateKey = RegistryCreateKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions")
ResWrite = RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions", "MaxAllowedZone", "00000001", RegistryTypeInt)

The program is 32bit and Windows 7 is 64bit on test machine.
According to the WD help it should write to:

but it writes to:

And it doesn't work even though if I run again, the key is found.
I put in the key myself where it should be and then it works.

I thought of detecting 32/64 bit and the write to the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node path.
Or maybe making two versions, 32/64bit, or even just keep 64bit if the 32bit computers are just a few.

Any other advice, inputs?


von kimor - am 03.12.2013 06:47

Re: WD 18 Empty Help File on UNC path

Hi kimor,
any Help files which do not sit on the client's computer have to be registered there in order to be shown! It's a security restriction, introduced by Microsoft in order to stop the bad boys from smuggling tainted help files (they are HTML after all!) onto the end user's computer. Just one of the many utilities for this purpose:
You can run the Help Registration Utility in order to get what you want.

von GuenterP - am 03.12.2013 08:13

Re: WD 18 Empty Help File on UNC path

Hi Guenther & Alex,

I copied the help file to tmp dir in the root of c: and that worked.
The problem with the registry is to write to Local Machine, you must be an admin.
So it was a bit hard with a script.


von kimor - am 07.12.2013 13:17
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.