none
Opening chm files using LDProcess.Start() RRS feed

  • Question

  • How to open a chm file to a specific topic using LDProcess.Start()

    Something like this - LDProcess.Start("Program.Directory\Help.chm","license")


    Nehal Ahmad


    • Edited by NehalAhmad Monday, October 1, 2018 4:27 AM
    Monday, October 1, 2018 4:25 AM

Answers

  • To open a .chm file to a specific topic:

    1.) Open the .chm file (doubleclick in explorer) and go to that specific topic.

    2.) Rightclick -> select 'Properties' at the bottom of the context menu

    3.) On the Properties-Tab select and copy the whole path under 'Address (URL)'

    eg. "mk:@MSITStore:C:\Your\Folder Path\MSDNMagazineJuly2003en-us.chm::/GDIColorPicke/chm.htm"

    Now your command will be:

    url = "mk:@MSITStore:C:\Your\Folder Path\MSDNMagazineJuly2003en-us.chm::/GDIColorPicker/chm.htm"

    '' OR ...  (you can remove the part  'mk:@MSITStore:')

    url = "C:\Your\Folder Path\MSDNMagazineJuly2003en-us.chm::/GDIColorPicker/chm.htm"

    LDProcess.Start("hh.exe", url)         ' hh.exe is in your %PATH%, in C:\Windows\hh.exe



    Monday, October 1, 2018 9:46 AM
    Answerer

All replies

  • This works.

    path= LDDialogs.OpenFile("chm","C:\")
    LDProcess.Start(path,"")

    Monday, October 1, 2018 7:41 AM
    Answerer
  • To open a .chm file to a specific topic:

    1.) Open the .chm file (doubleclick in explorer) and go to that specific topic.

    2.) Rightclick -> select 'Properties' at the bottom of the context menu

    3.) On the Properties-Tab select and copy the whole path under 'Address (URL)'

    eg. "mk:@MSITStore:C:\Your\Folder Path\MSDNMagazineJuly2003en-us.chm::/GDIColorPicke/chm.htm"

    Now your command will be:

    url = "mk:@MSITStore:C:\Your\Folder Path\MSDNMagazineJuly2003en-us.chm::/GDIColorPicker/chm.htm"

    '' OR ...  (you can remove the part  'mk:@MSITStore:')

    url = "C:\Your\Folder Path\MSDNMagazineJuly2003en-us.chm::/GDIColorPicker/chm.htm"

    LDProcess.Start("hh.exe", url)         ' hh.exe is in your %PATH%, in C:\Windows\hh.exe



    Monday, October 1, 2018 9:46 AM
    Answerer
  • Thank you very much. Working perfectly.

    But what is "hh.exe"?


    Nehal Ahmad

    Tuesday, October 2, 2018 11:09 AM
  • FileDescription: Microsoft® HTML Help Executable

    see

    *  HKLM\SOFTWARE\Classes\chm.file\shell\open\command

    *  HTMLHelp command-line

    *  Using Command Line Switches

    * Help+Manual

    PS: You could also open the .chm file in eg. 7zip, browse to that specific folder/topic  and adjust the internal path accordingly.

    Tuesday, October 2, 2018 11:34 AM
    Answerer