How WIZARD.APP Locates Wizard Files

ID: Q115329

The information in this article applies to:

SUMMARY

This article documents the steps followed by the wizards when they need to search for a file. Knowledge of the manner in which the wizards search for files can be helpful when you are troubleshooting behavioral problems.

MORE INFORMATION

When a wizard is chosen from the Run menu, FoxPro looks for a file called WIZARD.APP in the following order:

1. FoxPro looks in the following directory:

      SYS(2004) + '\wizards'

2. If the file is not found, FoxPro invokes the LOCFILE() function to
   provide the user with an opportunity to locate the file.

   NOTE: If step 2 is necessary, FoxPro does not save the location
   specified by the user. The user will have to point to the location of
   the files each time the wizards are subsequently invoked.

WIZARD.APP is the main wizard file. It contains common code that is shared among the various wizards. Each wizard resides in an independent file. These files are invoked by WIZARD.APP. For example, if the user chooses Wizards from the Run menu and then chooses Mail Merge, the following sequence of events will occur:

1. FoxPro invokes WIZARD.APP. 2. WIZARD.APP invokes WZ_MMERG.APP, as follows:

   a. WIZARD.APP looks in the directory SYS(2004) + '\wizards' for a file
      containing the desired wizard.

   b. If the file containing the desired wizard is not found in the
      SYS(2004) + '\wizards' directory, WIZARD.APP looks in the
      registration database (WIZARD.DBF) to find the path specified for the
      selected wizard. The name of the program file that contains a
      particular wizard is stored in the PROGRAM field. If the name of the
      wizard, as specified in the PROGRAM field, is preceded by a path,
      WIZARD.APP will look for the file at the location specified in the
      field.

   c. If the name of the file for the desired wizard is not preceded by a
      path, or the file for the desired wizard cannot be found at the
      location specified in the PROGRAM field, WIZARD.APP invokes the
      LOCFILE() dialog box.

      NOTE: If the user points to the location of the file for the desired
      wizard using the LOCFILE() dialog box, the path to the file will be
      stored in the PROGRAM field.

Additional reference words: FoxDos FoxWin 2.60 KBCategory: kbother kbtshoot KBSubcategory: FxtoolWizother

Last Reviewed: June 27, 1995