OFF97: Setup Adds Info to PATH Variable in Autoexec.bat

Last reviewed: March 13, 1998
Article ID: Q156352
The information in this article applies to:
  • Microsoft Office 97 for Windows

SUMMARY

When you install Microsoft Office 97, the Setup program may add information to the PATH statement in the Autoexec.bat file. This may cause problems with other programs that rely on information stored in the PATH variable.

MORE INFORMATION

Why Is Information Added to the PATH Statement?

When you install Microsoft Office 97, the Setup program places all of the programs (for example, Microsoft Excel and Microsoft Word) and the dynamic- link library (.dll) files they need in a single folder on the hard disk; by default, this folder is the Program Files\Microsoft Office\Office folder.

However, if you perform a Custom installation of Microsoft Office, you have the option of choosing different folders for the Microsoft Office programs. If you choose this option and install any of the programs into separate folders, the Setup program adds the information to the PATH statement in the Autoexec.bat file. Specifically, Setup adds the path to the default file location, Program Files\Microsoft Office\Office.

Setup adds the information to the PATH statement because the Microsoft Office programs are designed to look in the following locations for .dll files that they need:

  • The current folder
  • The Windows\System folder
  • The Windows folder
  • The folders in the PATH statement

If you move a program to a different folder, many of the .dll files required by the program remain in the default folder. In order for a program to find the .dll files it needs, Setup adds the path to the default folder to the PATH variable.

For example, if you perform a Custom installation of Microsoft Office 97 and place the Office programs in the following locations:

   Program                Location
   ---------------------------------------------------------------
   Microsoft Excel        C:\Program Files\Microsoft Office\Office
   Microsoft Word         C:\Program Files\Microsoft Office\Office
   Microsoft Access       C:\Program Files\Microsoft Office\Access
   Microsoft PowerPoint   C:\Program Files\Microsoft Office\Office
   Required .dll files*   C:\Program Files\Microsoft Office\Office

   * You cannot change the location for the .dll files.

When you start Microsoft Access, it looks for the .dll files that it needs in the following locations:
  • The current folder (C:\Program Files\Microsoft Office\Access)
  • The Windows\System folder
  • The Windows folder
  • The folders in the PATH statement

The required .dll files are not installed in the current folder, the Windows\System folder, or the Windows folder. However, because Setup added the path to the default folder to the PATH variable, Microsoft Access can find the .dll files it needs.

How Is the New Information Added to the PATH Statement?

If you use the Setup program to install a program to a different folder, Setup adds the path to the default folder to the beginning of the PATH variable. For example, if the PATH statement is:

   PATH=C:\Win95;C:\Win95\Command;C:\Mydata;C:\Otherapp

The Setup program modifies the PATH statement as follows:

   PATH=C:\PROGRA~1\MICROS~4\OFFICE;C:\Win95;C:\Win95\Command;C:\Mydata;
   C:\Otherapp

NOTE: The path to the default folder is added in the 8.3 MS-DOS naming convention. This format minimizes the length of the PATH variable. Also, the number following "MICROS~" may not be 4; it varies depending on what other folders are present in the Program Files folder.

What Problems Might I Encounter Due to Changes in the PATH Variable?

  1. If the required changes to the PATH variable would cause it to exceed 128 characters in length, you will receive the following error message during Setup:

          The PATH statement in your Autoexec.bat file is too long for Setup to
          modify.
    

          Before your new software will run correctly, you must edit the
          Autoexec.bat file manually to add the following folder to your PATH
          statement:
    

          C:\Program Files\Microsoft Office\Office
    

    If this error message is displayed, when Setup is complete, edit the PATH statement in the Autoexec.bat file (using Sysedit or Notepad) and add the required folder name to your PATH.

    NOTE: When you edit the PATH, it cannot exceed 128 characters in length.

    As an alternative, you can remove Microsoft Office 97 completely from the computer, and then reinstall it using the default file locations.

  2. Although adding information to the PATH statement allows the Microsoft Office programs to find the .dll files that they need, it may cause problems when you use Dynamic Data Exchange (DDE) to communicate with a program that is not in its default folder.

    If this is the case, add the path of the program you moved to the PATH statement in the Autoexec.bat file. For example, using the Microsoft Access case above, you would add the following information:

          C:\PROGRA~1\MICROS~4\ACCESS
    

    to the PATH statement. Other programs would then be able to use DDE to communicate with Microsoft Access.


Additional query words: OFF97 8.00 batch XL97
Keywords : OffWinSetup kbdta kbfaq kbsetup
Version : WINDOWS:97
Platform : WINDOWS


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