You are here: > Home > Support > ToolBook Knowledge Base

Knowledge Base

Printer Friendly
How does a ToolBook .EXE file know how to find and run the Runtime Engine?

When you perform a "Save As EXE" on a book, an "exe stub" is added to the ToolBook file and it is saved with an EXE extension.

The exe stub is a small bit of executable code that performs the task of locating the ToolBook system with which to start the book.

When you double-click on an EXE version of a ToolBook book in Explorer, the exe stub does the following (stopping as soon as it succeeds in launching the book):

  1. Locate TOOLBOOK.INI file 
  2. In TOOLBOOK.INI, look for a TBxx entry in the [Registered Apps] section.  If it is not null, use the first item of the entry as a directory and attempt to launch the book with the following:
     
    • \TBxx.EXE
       
    • \TBxxRUN.EXE
       
  3. Attempt to launch the book with the following:
     
    • TBxx.EXE
       
    • TBxxRUN.EXE
       
      (Note that the absence of an explicit path allows Windows to look for TBxx.EXE or TBxxRUN.EXE. This is why having .EXE books in the same directory as the runtime engine works.)
       
  4. Look in the Registry for a .TBK file association, and if found, attempt to launch the book with the associated program. If present, this entry should point to TBLOAD.EXE, which is the ToolBook Loader component.
     
  5. Finally, resort to what TBLOAD.EXE would do:
     
    • Look in TOOLBOOK.INI (if one was found in step 1) for a TBxx entry in the [ToolBook Load Information] section.
       
    • If the entry exists, attempt to launch the book with the specified program.
       
  6. If you get to this step, you're out of luck. The book can't be loaded.

OPENSCRIPT NOTICE
The OpenScript programming examples found in many articles may need modification in order to work in ToolBook 9.0 or higher, particularly if the article was written for an older version of ToolBook. To learn more, click here.

  Provide Anonymous Feedback About This Article