Program Files

Program Files is the directory name of a standard folder in Microsoft Windows operating systems in which applications that are not part of the operating system are conventionally installed. Typically, each application installed under the 'Program Files' directory will have a subdirectory for its application-specific resources. Shared resources, for example resources used by multiple applications from one company, are typically stored in the 'Common Files' directory.

Location

In a standard Windows installation, the 'Program Files' directory will be at %SystemDrive%\Program Files (or the localized equivalent thereof), and the 'Common Files' (or the localized equivalent thereof) will be a subdirectory under 'Program Files'. In Windows Vista and later, the paths to the 'Program Files' and 'Common Files' directories are not localized (translated) on disk. Instead, the localized names are NTFS junction points to the non-localized locations. Additionally, the Windows shell localizes the name of the Program Files folder depending on the system's user interface display language.

Both 'Program Files' and 'Common Files' can be moved. At system startup, the actual paths to 'Program Files' and 'Common Files' are loaded from the Windows registry, where they are stored in the ProgramFilesDir and CommonFilesDir values under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. They are then made accessible to the rest of the system via the volatile environment variables %ProgramFiles%, and %CommonProgramFiles%. Applications can also obtain the locations of these paths by querying the Setup API using dirids, or through Windows Management Instrumentation, or by querying the shell using CSIDLs, or ShellSpecialFolderConstants. These are all localization-independent methods.

x86-64 and IA-64 versions of Windows have two folders for application files: The Program Files folder serves as the default installation target for 64-bit programs, while the Program Files (x86) folder is the default installation target for 32-bit programs that need WoW64 emulation layer. While 64-bit Windows versions also have a %ProgramFiles(x86)% environment variable, the dirids and CSIDLs are not different between 32-bit and 64-bit environments; the APIs merely return different results, depending on whether the calling process is emulated or not.[1]

To be backwards compatible with the 8.3 limitations of the old File Allocation Table filenames, the names 'Program Files', 'Program Files (x86)' and 'Common Program Files' are shortened by the system to progra~N and common~N, where N is a digit, a sequence number that on a clean install will be 1 (or 1 and 2 when both 'Program Files' and 'Program Files (x86)' are present).

Redirection

If Windows is installed on an NTFS volume, by default, the 'Program Files' folder can only be modified by members of the 'Administrators' user groups. This can be an issue for programs created for Windows 9x. Those operating systems had no file system security, and programs could therefore also store their data in 'Program Files'. Programs that store their data in 'Program Files' will usually not run correctly on Windows NT systems with normal user privileges unless security is lowered for the affected subdirectories.

Windows Vista addressed this issue by introducing File and Registry Virtualization. When this UAC virtualization is enabled for a process, Windows saves changes to the 'Program Files' folder to %LocalAppData%\VirtualStore\Program Files (x86).[2]

History

"Program Files" appeared in Windows 95. "Common Files" appeared in Windows 98.[3]

An unknown Windows NT version uses "Common" instead of "Common Files".[4] Windows 2000 does not seem to exhibit this behavior.[3] The CSIDL documentation mentions that "CSIDL_PROGRAM_FILES_COMMON" requires Shell32 version 5.0 (Windows 2000 and ME), but says it is only valid on Windows XP (6.0).[5]

Localization

Language of Windows Name of the folder that
stores program files
Name of the folder that
stores shared program files
EnglishProgram FilesCommon Files
ArabicProgram Files (ملفات البرامج (x86) for WoW64)Common Files
Chinese (Simplified, Traditional, Taiwan)Program FilesCommon Files
CzechProgram FilesCommon Files
DanishProgrammerFælles filer
DutchProgram FilesCommon Files
FinnishProgram FilesCommon Files
FrenchProgrammes *Fichiers communs
GermanProgrammeGemeinsame Dateien
HebrewProgram FilesCommon Files
Hellenic (Greek)Αρχεία ΕφαρμογώνCommon Files
HungarianProgramfájlokCommon Files
ItalianProgrammiFile comuni
JapaneseProgram FilesCommon Files
KoreanProgram FilesCommon Files
NorwegianProgramfilerFellesfiler
PolishProgram Files (Pliki programów (x86) for WoW64)Common Files
PortugueseProgramasFicheiros comuns
Portuguese (Brasil)Arquivos de ProgramasArquivos comuns
RomanianProgram FilesCommon Files
RussianProgram FilesCommon Files
SpanishArchivos de programaArchivos comunes
SwedishProgramDelade filer
TurkishProgram Files (Program Dosyaları (x86) for WoW64)Common Files
* In Windows Vista and later versions. (The folder name was the same as in English in the older versions of Microsoft Windows.)

See also

References

  1. "winapi - SHGetFolderPath() 32 bit vs 64 bit". Stack Overflow.
  2. Inside Windows Vista User Account Control by Mark Russinovich
  3. Emulated system images from https://copy.sh/v86/
  4. "Special Folders and Custom Folders". learn.microsoft.com.
  5. "CSIDL (Shlobj.h) - Win32 apps". learn.microsoft.com. CSIDL_PROGRAM_FILES_COMMON FOLDERID_ProgramFilesCommon Version 5.0. A folder for components that are shared across applications. A typical path is C:\Program Files\Common. Valid only for Windows XP.

Further reading

  • Karp, David A.; O'Reilly, Tim; Mott, Troy (2005). Windows XP in a nutshell (2nd ed.). O'Reilly Media. p. 512. ISBN 978-0-5960-0900-7.
  • Shilmover, Barry; Sjouwerman, Stu (2001). Windows 2000 power toolkit (1st ed.). Que Publishing. ISBN 978-0-7357-1061-0.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.