INFO: Locating Program Files on Localized Versions of Windows

Last reviewed: January 15, 1998
Article ID: Q178625
The information in this article applies to:
  • Microsoft Windows 95
  • Microsoft Windows NT, version 4.0

SUMMARY

In many cases, applications cannot find the path of the Program Files directory in international versions of Windows because the path is not C:\Program Files. For example, on German Windows 95, it is called Programme. The problem occurs when developers hard code the location of the Program Files directory. Instead, developers should refer to the system registry to identify the location of the Program Files directory.

MORE INFORMATION

You can find a glossary of localized names for each country on the Microsoft Developer’s Network (MSDN), "Development Platform-INTL,” disc 1. On the disc, there is a folder for each country's glossaries. For example, in the German folder, there are several Microsoft Excel files (.xls). One of them is for Window 95. In German Windows 95, Program Files is "Programme" as specified in the file.

However, to ensure that your application can run on any platform, it can check the registry value for the location of a directory. This approach eliminates the need to hard code the directory path. Refer to the value for the ProgramFilesDir key at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion] to find the localized name of the Program Files directory.

Keywords          : KBIntlDev
Version           : Winnt:4.0
Platform          : Win95 winnt
Issue type        : kbinfo


================================================================================


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