.CHM file problem in Windows 8
.CHM file problem in Windows 8
While programming, we all are using very regularly the important help file "PureBasic.chm".
I just installed Windows 8 x64 and PureBasic 5.11 x64.
PureBasic is working like a charm, and when pressing the F1-key, the help file could be loaded but could NOT be displayed in the large right panel. It says "This program cannot display the webpage". Needless to say that this is frustrating.
I searched the internet for a solution and found out that we could "Unblock" the .chm file by right-clicking on it, click Properties, click Unblock. BUT... there is NO Unblock button anymore!
Another solution was to use PowerShell, and use the cmdlet "Unblock-File /<path>/PureBasic.chm" (without the quotes) but this has no effect either.
How can I read the .chm file???
Thanks.
I just installed Windows 8 x64 and PureBasic 5.11 x64.
PureBasic is working like a charm, and when pressing the F1-key, the help file could be loaded but could NOT be displayed in the large right panel. It says "This program cannot display the webpage". Needless to say that this is frustrating.
I searched the internet for a solution and found out that we could "Unblock" the .chm file by right-clicking on it, click Properties, click Unblock. BUT... there is NO Unblock button anymore!
Another solution was to use PowerShell, and use the cmdlet "Unblock-File /<path>/PureBasic.chm" (without the quotes) but this has no effect either.
How can I read the .chm file???
Thanks.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: .CHM file problem in Windows 8
It might just be related to this: http://www.purebasic.fr/english/viewtop ... 47#p410147
Can you run the .chm independently of PB? How about .chm files from other apps?
Can you run the .chm independently of PB? How about .chm files from other apps?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: .CHM file problem in Windows 8
Right Click, Properties/Security
User/yourepc/user
Set to read and read and run.
I can't say the orginal verbs, my system is german.
User/yourepc/user
Set to read and read and run.
I can't say the orginal verbs, my system is german.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: .CHM file problem in Windows 8
Sorry guys, I was unable to make the CHM file from Windows open'able. Very frustrating, as I have spent several hours on the internet to find a solution from forums, and thank you IdeasVacuum and TS-Soft, but your solutions were not successful either.
I installed a French version of Windows 8 (because there was no English version available), then I downloaded and installed the English version successfully, as well put the Region data to English. Everything became English, except the words "Administrateurs" and "Utilisateurs" which were still in French in the Security tab of the properties of the PureBasic.chm file. Perhaps due to this fact, I could not change the access behaviours, as if it was looking for "Administrators"? Anyway, a good advice: *Always* buy Windows in the original language version to avoid "forgotten" places or stupid "remnants"...
(User Account "Guest" was also still "Invité"!!!)
The final solution was to try a third-party software, that still could open and read chm-files. The best one that I could find so far is KCHMviewer, at http://www.ulduzsoft.com/linux/kchmviewer/, it is a nice professional looking freeware without ads. The download link on their website is located on the right panel, under the 'Navigation' panel, the 4th line that reads "Getting kchmviewer", there is also a Windows program.
The big problem now is that when I press the F1-key in the PB editor, it automatically launches the Microsoft CHM viewer. Can I change this behaviour to open kchmviewer.exe from within the PB editor?
Thanks.
I installed a French version of Windows 8 (because there was no English version available), then I downloaded and installed the English version successfully, as well put the Region data to English. Everything became English, except the words "Administrateurs" and "Utilisateurs" which were still in French in the Security tab of the properties of the PureBasic.chm file. Perhaps due to this fact, I could not change the access behaviours, as if it was looking for "Administrators"? Anyway, a good advice: *Always* buy Windows in the original language version to avoid "forgotten" places or stupid "remnants"...
The final solution was to try a third-party software, that still could open and read chm-files. The best one that I could find so far is KCHMviewer, at http://www.ulduzsoft.com/linux/kchmviewer/, it is a nice professional looking freeware without ads. The download link on their website is located on the right panel, under the 'Navigation' panel, the 4th line that reads "Getting kchmviewer", there is also a Windows program.
The big problem now is that when I press the F1-key in the PB editor, it automatically launches the Microsoft CHM viewer. Can I change this behaviour to open kchmviewer.exe from within the PB editor?
Thanks.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: .CHM file problem in Windows 8
Can you open the .CHM if you log in as administrator? Unblock it as admin?
Re: .CHM file problem in Windows 8
No, because I am the Administrator. On my computer anyway
But your question gave me an idea. Do you know what is the filename of the Microsoft CHM viewer? I would like to rename my kchmviewer to that filename and see what happens.
But your question gave me an idea. Do you know what is the filename of the Microsoft CHM viewer? I would like to rename my kchmviewer to that filename and see what happens.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: .CHM file problem in Windows 8
You are real admin when elevated, otherwise only virtual admin.charvista wrote:No, because I am the Administrator. On my computer anyway
Can you right click PureBasic.exe -> "Run as administrator" and open help then?
It is usually hh.execharvista wrote:But your question gave me an idea. Do you know what is the filename of the Microsoft CHM viewer? I would like to rename my kchmviewer to that filename and see what happens.
Maybe just change file assoziation for .chm files. Try right clicking on PureBasic.chm with SHIFT key down -> Open With -> Choose default program.
Re: .CHM file problem in Windows 8
You are right! I forgot that.Danilo wrote:You are real admin when elevated, otherwise only virtual admin.
Yes, PureBasic could be launched with "Run as Administrator", but NO, the Help file is still not showing its contents.Danilo wrote:Can you right click PureBasic.exe -> "Run as administrator" and open help then?
I tried that, too. When double-clicking the PureBasic.chm file from the Explorer, the kchmviewer is lauched and displaying the chm file as expected.Danilo wrote:Maybe just change file assoziation for .chm files.
But not from the PB-editor. I think that PB forcingly launches hh.exe, and not loading the associated file from the register.
Now I am going to try to rename kchmviewer.exe to hh.exe and put it in Window's directory and see what happens. I think this behavior should be changed.
I keep you informed.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: .CHM file problem in Windows 8
Unable to rename hh.exe, even with cmd.exe in Super-Admin mode: access is denied.
I was also unable to modify the rights of hh.exe (but I do not know how to get into the properties window in elevated mode). Microsoft has blocked a lot. I need permission from TrustedInstaller to make changes to this file. This is really going too far for a simple help file!
If I could redirect hh.exe to kchmviewer.exe, it would be solved. But how? I cannot edit the PB-editor!
I fear this is something for Fred/Freak.
Edit : I also tried to put the environment variable PATH so that the directory of kchmviewer is set before Windows, and renamed to hh.exe, but no success. This means that the full path to hh.exe is included in the editor!
I was also unable to modify the rights of hh.exe (but I do not know how to get into the properties window in elevated mode). Microsoft has blocked a lot. I need permission from TrustedInstaller to make changes to this file. This is really going too far for a simple help file!
If I could redirect hh.exe to kchmviewer.exe, it would be solved. But how? I cannot edit the PB-editor!
I fear this is something for Fred/Freak.
Edit : I also tried to put the environment variable PATH so that the directory of kchmviewer is set before Windows, and renamed to hh.exe, but no success. This means that the full path to hh.exe is included in the editor!
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: .CHM file problem in Windows 8
No, you call HtmlHelp_() API to open HTML HELP:charvista wrote:This means that the full path to hh.exe is included in the editor!
Code: Select all
Prototype protoHtmlHelpA(hwndCaller, pszFile.p-ascii , uCommand.l, *dwData)
Prototype protoHtmlHelpW(hwndCaller, pszFile.p-unicode, uCommand.l, *dwData)
#HH_DISPLAY_TOPIC = $0000
#HH_HELP_FINDER = $0000 ; WinHelp equivalent
#HH_DISPLAY_TOC = $0001
#HH_DISPLAY_INDEX = $0002
#HH_DISPLAY_SEARCH = $0003
lib = LoadLibrary_("hhctrl.ocx")
If lib
HtmlHelpA_.protoHtmlHelpA = GetProcAddress_(lib,14)
HtmlHelpW_.protoHtmlHelpW = GetProcAddress_(lib,15)
Macro HtmlHelp_(a,b,c,d)
CompilerIf #PB_Compiler_Unicode
HtmlHelpW_(a,b,c,d)
CompilerElse
HtmlHelpA_(a,b,c,d)
CompilerEndIf
EndMacro
topic.s = "::/help/openhelp.html"
;topic.s = ""
;
; http://helpware.net/htmlhelp/linktochm.htm
;
; Conclusion: For IE5.
;
; 1. Must have UNIX slashes not DOS slashes.
;
;
home.s = ReplaceString(#PB_Compiler_Home,"\","/")
HtmlHelp_(0,home + "PureBasic.chm" + topic, #HH_DISPLAY_TOPIC, 0)
Delay(3000)
FreeLibrary_(lib)
EndIfPS:
- Is IE correctly installed on your system? HtmlHelp_() requires correct IE install and registered DLLs.
- Also, .chm is sometimes blocked when on network drive.
EDIT 2:
Just found an (maybe important) detail:
Can you try the last code again, please? Includes: home.s = ReplaceString(#PB_Compiler_Home,"\","/")http://helpware.net/htmlhelp/linktochm.htm
Conclusion: For IE5.
1. Must have UNIX slashes not DOS slashes.
Re: .CHM file problem in Windows 8
Danilo,
This morning, I tried your code, and still no luck. Still the infamous "The page cannot be displayed" message...
Then I thought, that's not possible. Something must be wrong. But what? I reinstalled PureBasic, and tried F1 as a reflex. Surprise, it worked!
Then, I was thinking why it now works and yesterday it did not. No, not because it was the 13th LOL.
The only thing I did since this brand new installation of Windows 8 is that I installed PB somewhere else than in /Program Files/. I installed it in C:\#BIN\PB\. And then suddenly, I knew the reason! C:\#BIN\PB\ contains the #-character! I remember that I read in the forums that the FILENAME may not contain the #-character as it is a special Html character. But the FILENAME is "PureBasic.chm", and they never spoke about the PATH!!!
As you see, the exact TERMINOLOGY is so important. "Filename, including the path (, including the drive letter?)" would have been more accurate.
Danilo, I am so sorry to have kept you awake trying to find a solution, as I see it was very late when you posted it. I am so ashamed, but I thank you for your cooperation. Without your interesting last post, I would probably not have thought about that #-character in the path.
May this topic be a good lesson for everybody who might encounter the same problem. It was certainly not futile. Again, thank you all of you.
PS: still, it is not normal that I cannot use the chm-viewer of my choice.
This morning, I tried your code, and still no luck. Still the infamous "The page cannot be displayed" message...
Then I thought, that's not possible. Something must be wrong. But what? I reinstalled PureBasic, and tried F1 as a reflex. Surprise, it worked!
Then, I was thinking why it now works and yesterday it did not. No, not because it was the 13th LOL.
The only thing I did since this brand new installation of Windows 8 is that I installed PB somewhere else than in /Program Files/. I installed it in C:\#BIN\PB\. And then suddenly, I knew the reason! C:\#BIN\PB\ contains the #-character! I remember that I read in the forums that the FILENAME may not contain the #-character as it is a special Html character. But the FILENAME is "PureBasic.chm", and they never spoke about the PATH!!!
As you see, the exact TERMINOLOGY is so important. "Filename, including the path (, including the drive letter?)" would have been more accurate.
Danilo, I am so sorry to have kept you awake trying to find a solution, as I see it was very late when you posted it. I am so ashamed, but I thank you for your cooperation. Without your interesting last post, I would probably not have thought about that #-character in the path.
May this topic be a good lesson for everybody who might encounter the same problem. It was certainly not futile. Again, thank you all of you.
PS: still, it is not normal that I cannot use the chm-viewer of my choice.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: .CHM file problem in Windows 8
Hello,
I installed KeyHH as PureBasic tool. Now I can call the english help with F1 and the german help with Ctrl+F1.
Steps to get german AND english help:
If you want to call KeyHH with F1 you have to add KeyHH as PureBasic tool and use shortcut F1.
Before you can use shortcut F1 for a PureBasic tool you have to delete the shortcut F1 in PureBasic preferences.
Hope this helps you,
greeting from germany/bavaria,
guido
I installed KeyHH as PureBasic tool. Now I can call the english help with F1 and the german help with Ctrl+F1.
Steps to get german AND english help:
- Install PureBasic with german help
- Copy the german help file PureBasic.chm to different folder or rename it.
- Re-Install PureBasic with the english help
- Download KeyHH
- Unpack the ZIP-File
- Unpack the Setup file witz 7-zip (you do not need to install the tool).
- Copy the folder where you want
- Add KeyHH as PureBasic tool with the following settings:
- Commandline: [full path to KeyHH.exe]
- Arguments: -PureBasicHelp -#klink "%WORD" "full path to german PureBasic.chm"
- Name: German PureBasic Help
- Event to trigger to tool: Menu or Shortcut
- ShortCut: Ctrl+F1
- ==> no other options
- Open a PureBasic source code file or write a purebasic command
- set the cursor in the purebasic command
- Press F1 to open english help for the purebasic command
==> standard microsoft htmlhelpl viewer hh.exe is used! - Press Ctrl+F1 to open german help for the purebasic command
==> KeyHH.exe is used to display help
If you want to call KeyHH with F1 you have to add KeyHH as PureBasic tool and use shortcut F1.
Before you can use shortcut F1 for a PureBasic tool you have to delete the shortcut F1 in PureBasic preferences.
Hope this helps you,
greeting from germany/bavaria,
guido
Last edited by helpy on Sun May 05, 2013 10:37 am, edited 1 time in total.
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
PB Last Final / Last Beta Testing
-
NuclearFusion
- User

- Posts: 35
- Joined: Wed Nov 22, 2006 2:00 pm
Re: .CHM file problem in Windows 8
Hi,
when you run a Google search with the string
In my opinion the free downloadable MBAM antmalware here
Regards,
Arie
when you run a Google search with the string
you will see that there seems to be malware that generates that message exactly."This program cannot display the webpage"
In my opinion the free downloadable MBAM antmalware here
would be a good choice to try and remove the malware.
Regards,
Arie
Re: .CHM file problem in Windows 8
There are also other pathnames which will cause the same problemcharvista wrote:And then suddenly, I knew the reason! C:\#BIN\PB\ contains the #-character! I remember that I read in the forums that the FILENAME may not contain the #-character as it is a special Html character. But the FILENAME is "PureBasic.chm", and they never spoke about the PATH!!!
Here some examples which cause the same problem:
- ..path\test.chm\PureBasic.chm
- ..path\test.chm.test\PureBasic.chm
May be there are some more strings which would cause this problem
See my post ==> http://www.purebasic.fr/english/viewtop ... 88#p410788charvista wrote:PS: still, it is not normal that I cannot use the chm-viewer of my choice.
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
PB Last Final / Last Beta Testing

