views:

301

answers:

6

Is there a reliable way to detect whether or not WinHelp is installed on Windows Vista or newer versions of Windows? If possible, I'd like a solution that's not specific to any particular version of Windows.

I've posted this question to other message boards and got back answers regarding the size of Winhlp32.exe before and after installing WinHelp and Registry entries that Microsoft has documented, but none of them were correct.

A: 

I hate to say it, but move on from WinHelp. It's been deprecated for a reason. We were able to migrate to a .chm in only a few hours. It's pretty straight-forward to use the newer help authoring tools, and newer formats like .chm give you benefits like cascading style sheets.

Bob King
A: 

The reason why I am asking the question is because we have software in beta that still uses WinHelp (due to a corporate decision not to change over to a newer help system just yet) and want to put something into its installer that would, if necessary (i.e., if WinHelp is not installed), call into WinHelp to cause the OS to bring up the link that tells them where to get the WinHelp installer. We are moving away from WinHelp in future versions of the software.

A: 

Other than trying to convince management of the problems of this approach, you can look into the windows registry.

Basically, if WinHelp is registered, the following registry entries are present:

  • HKEY_CLASSES_ROOT \ .hlp -> (Default) = hlpfile

  • HKEY_CLASSES_ROOT \ hlpfile \ shell \ open \ command \ (Default) contains the string "winhlp32.exe"

if both of these values are correct, then winhelp is available, and registered. You can also retrieve the location of winhlp32.exe from here.

Hope it helps.

Silver Dragon
A: 

I'm afraid that you gave me another false lead. Those Registry items are there even before WinHelp is installed.

Other false leads that I've been given on other boards include checking the size of %SystemRoot%\WinHlp32.exe (no difference between the sizes before or after WinHelp is installed) and looking at the Registry key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WinHelp (again, no differences).

RobH
+1  A: 

The download for WinHelp from Microsoft appears to be a hotfix (.msu) that enables the WinHelp program. This would explain why the size/registry keys don't change as the hotfix is just a "delta" change from the orginal file.

Since it's a hotfix, this means that you should be able to query the installed hotfixes for your OS.

The following command generates a .htm document listing all of the installed hotfixes.

wmic qfe list full /format:htable >C:\hotfixes.htm

The table generated lists the Knowledge Base articles corresponding to the hotfix that is installed. You can search for "917607" because that should be present if you've installed the WinHelp hotfix. You may be able to pass in different options to the utility to perform a better search. NOTE - The wmic command requires admin privileges to run.

Link to Microsoft KB Article on WinHelp

TrevH
A: 

Bob King, what did you use to convert to .chm?