Article ID: 178625 - Last Review: February 22, 2007 - Revision: 4.1

INFO: Locating Program Files on Localized Versions of Windows

This article was previously published under Q178625
Expand all | Collapse all

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.

APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 95
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
Keywords: 
kbinfo kbintldev KB178625
 

Article Translations

 

Related Support Centers