INFO: Locating Program Files on Localized Versions of Windows (178625)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 95
  • Microsoft Windows NT Server 4.0
  • Microsoft Windows NT Workstation 4.0

This article was previously published under Q178625

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.

Modification Type:MajorLast Reviewed:4/9/2004
Keywords:kbinfo kbIntlDev KB178625