How to tell VB6 where to find winhlp32.exe

863 Views Asked by At

I maintain a large VB6 application I would like to be able to install on Windows 10. It has a large Help file in WinHelp format. I would like to distribute winhlp32.exe (and winhlp32.exe.mui) with the application rather than replace the winhlp32.exe file in the Windows 10 Windows folder. If I put (an old) winhlp32.exe file in the application folder in Windows 10, and file winhlp32.exe.mui in a subfolder named en-US, the help file works if I enter the command "winhlp32.exe myhelpfile.hlp" in the application folder. However if I run the application exe (created by VB6), and press F1, it runs the Windows 10 winhlp32.exe stub, not the winhlp32.exe in the application folder.

Can anyone suggest how to persuade the VB6 application (before or after compiling it) to use winhlp32.exe from the application folder instead of the Windows folder?

2

There are 2 best solutions below

3
On

Try (untested, but you should get the idea)

 Shell App.Path & "\winhlp32.exe myhelpfile"

App.Path gets the executable's current path, so just make sure your winhlp32.exe file is right there with it.

0
On

The short story - you may be warned and you know in all it's a heavy task to migrate your VB6 app maybe without reaching a simple way for migrating WinHelp to HTMLHelp.

The official recommendation (10 years old):

Forget about WinHelp, it's history and migrate to CHM help file format.

But, maybe you already have found my answer (search for Run WinHelp on Windows10) and read all further links:

Please note a tool called HHPMod especially for migrating context-sensitive F1 help.

I tried the WinHelp of an old VB6 program before and after the fix from above and it is working for me on Windows 10 (Version 1803).

enter image description here

Another solution you may want to try (depends on your deploy and IT environment):

Quoted from this article (thanks to Komeil Bahmanpour):

"Please note users who have tried to replace winhlp32.exe manually in Windows folder and winhlp32.exe.mui in Windows\en-US folder of Windows 7, was faced with overwrite restrictions due to ownership and permission problems."

Additional information:

I may well be wrong, but I believe that also (old) online help files are usually copyrighted as part of Microsoft Windows. Distributing the files would normally constitute a violation of copyright law (as you mentioned in your question).

AFAIK developers are not allowed to distribute the Vista version of WinHlp32.exe or included it in their installations. Every individual user who wants to use WinHelp must download the WinHelp update directly from Microsoft and install it themselves.

Help for applications has been .chm for many many years now. Microsoft released the tool HH Workshop (HTMLHelp SDK 1.4) around 1997. Around March 2006 during discussions with MVPs, Microsoft Help team announced that WinHelp would be deprecated (phased out). WinHelp is architected in such a way that Microsoft would have to rewrite it from the ground up to meet the Windows Vista code standards. Since then .CHM has been the only choice for our application help.

What does this mean (please note we are about ten years later now!):

  • WinHelp runtime (WinHelp32.exe) no longer ships with Windows Vista/7/8/10
  • ISVs (Independant Software Vendors) should stop promoting WinHelp as a viable help system.
  • Help authors should move over to HTML Help 1.x (.chm) if they haven't done so already.

HH Workshop is sufficient to author .CHM help files. I'm using a tool with a few more features (drag and drop TOC/Index editing etc) called "FAR HTML". Then there are high-end more expensive tools (you mentioned RoboHelp) that have advanced features such as "convert between different help systems".