Windows PIF File Search Processes

Last reviewed: November 23, 1994
Article ID: Q81096
The information in this article applies to:
  • Microsoft Windows operating system versions 2.x, 3.0, 3.0a

SUMMARY

Windows/286, Windows/386

When you activate an application with the extension .COM, .EXE, or .BAT, Windows will search for a PIF file in the following order:

  1. The WIN.INI [pif] section

  2. The directory where the executable file is specified

  3. As follows, where <startup> is the directory in which Windows is initially executed (usually \WINDOWS):

    a. If the executable file is a .PIF file, Windows looks in

          <startup>\PIF; then, it looks along the path.
    

    b. If the executable file is not a .PIF, Windows looks along the

          path; then, it looks in <startup>\PIF.
    

Windows 3.0

Attempting to start a non-Windows-based application may result in the execution of the wrong non-Windows-based application. This problem occurs because of Windows 3.0's search algorithm. When Windows prepares to run a non-Windows-based application, it searches for a .PIF file with the same name as the executable file. The first .PIF file found is executed.

Windows searches the directory in which the application is located, the WINDOWS directory, and the directories in the PATH statement. If Windows finds no .PIF file, it uses _DEFAULT.PIF.

MORE INFORMATION

For example, Quicken and Quattro Pro have the same executable filename. An attempt to run Quicken (Q.EXE) may result in the execution of Quattro Pro (Q.EXE) if the first Q.PIF file found points to the incorrect Q.EXE file, unless one of the following steps is taken:

  1. Rename the .PIF file to a unique name. For example, rename Q.PIF to QUICKEN.PIF or QUATTRO.PIF.

    -or-

  2. Move the .PIF file into the directory containing its .EXE file: For example, move Q.PIF for Quicken to the QUICKEN directory, or Q.PIF for Quattro Pro to the QUATTRO directory.

    -or-

  3. Do the following:

    a. From the Program Manager, select the icon you want to edit.

    b. From the File menu, choose Properties.

    c. In the Command Line text box, type the [Drive][Path][Filename.PIF]

          of the .PIF file you want to run. For example, C:\QUICKEN\Q.PIF
          instead of Q.PIF.
    


KBCategory: kbenv
KBSubcategory: win30
Additional reference words: 1.00 2.00 2.x 3.00 3.00a win30 q.exe quicken
quattro quatro qpro pif


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: November 23, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.