Running WINHELP.EXE with Command Line Switches

Last reviewed: July 23, 1997
Article ID: Q115183
3.10 WINDOWS kbtool

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows, version 3.1

SUMMARY

It is possible to use certain command-line arguments on the running of WINHELP.EXE to go immediately to areas of the help file other than the contents.

MORE INFORMATION

When calling WINHELP.EXE, but before specifying the help file name, use the following switches:

   -k  Go to keyword (set up with the K footnote within the help file).

   -n  Go to context number (set up with the # footnote within the help
       file).

   -i  Go to context ID (set up with the # footnote within the help file
       using a #defined string).

   -h  Run WINHELP.EXE with the WINHELP.HLP file (no other help file is
       necessary).

EXAMPLES

The following examples can be tested by typing them into the Run dialog box that opens when you choose Run from the File menu in the Program Manager.

To run the file MYHELP.HLP and jump to the keyword "jumphere", type the following:

      WINHELP.EXE -kjumphere myhelp.hlp

To run the file TEST.HLP and jump to the topic with context ID number 101, type the following:

      WINHELP.EXE -n101 test.hlp

To run the file CIJUMP.HLP and jump to the topic with context ID "MY_JUMPID" (which had previously been set within the .HLP file with
#define MY_JUMPID 102), type the following:

      WINHELP.EXE -iMY_JUMPID cijump.hlp

To run the file "Help on Help", type the following:

      WINHELP.EXE -h


Additional reference words: 3.10 hc hcp
KBCategory: kbtool
KBSubcategory: TlsHlp
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 23, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.