{{Outdated|date=January 2025}} {{Short description|Standard directory in Microsoft Windows}} '''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 <nowiki>'</nowiki>'''Common Files'''<!-- using the envvar name for clarity--><nowiki>'</nowiki> directory.

==Location== In a standard Windows installation, the 'Program Files' directory will be at <code>%SystemDrive%\Program Files</code> (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 <code>ProgramFilesDir</code> and <code>CommonFilesDir</code> values under <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion</code>. They are then made accessible to the rest of the system via the volatile environment variables <code>%ProgramFiles%</code>, and <code>%CommonProgramFiles%</code>. Applications can also obtain the locations of these paths by querying the <code>Setup API</code> using <code>dirids</code>, or through Windows Management Instrumentation, or by querying the shell using CSIDLs, or <code>ShellSpecialFolderConstants</code>. 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 <code>%ProgramFiles(x86)%</code> 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.<ref>{{cite web |title=winapi - SHGetFolderPath() 32 bit vs 64 bit |url=https://stackoverflow.com/a/138473 |website=Stack Overflow |language=en}}</ref>

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 <code>progra~''N''</code> and <code>common~''N''</code>, 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 <code>%LocalAppData%\VirtualStore\Program Files (x86)</code>.<ref>[https://docs.microsoft.com/en-us/previous-versions/technet-magazine/cc138019(v=msdn.10)?redirectedfrom=MSDN Inside Windows Vista User Account Control] by Mark Russinovich</ref>

== History == "Program Files" appeared in Windows 95. "Common Files" appeared in Windows 98.<ref name=v86>Emulated system images from https://copy.sh/v86/</ref>

An unknown Windows NT version uses "Common" instead of "Common Files".<ref>{{cite web |title=Special Folders and Custom Folders |url=https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/s2esdf4x(v=vs.100) |website=learn.microsoft.com | date=November 2012 |language=en-us}}</ref> Windows 2000 does not seem to exhibit this behavior.<ref name=v86/> 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).<ref>{{cite web |title=CSIDL (Shlobj.h) - Win32 apps |url=https://learn.microsoft.com/en-us/windows/win32/shell/csidl |website=learn.microsoft.com |date=22 March 2021 |language=en-us |quote=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.}}</ref>

== Localization == {| class="wikitable" !Language of Windows !Name of the folder that<br/>stores program files !Name of the folder that<br/>stores shared program files |- | English || Program Files || Common Files<br> |- | Arabic || Program Files ({{lang|ar|ملفات البرامج (x86)|rtl=yes}} for WoW64) || Common Files<br> |- | Chinese (Simplified, Traditional, Taiwan) || Program Files || Common Files<br> |- | Czech || Program Files || Common Files<br> |- | Danish || {{lang|da|Programmer}} || {{lang|da|Fælles filer}}<br> |- | Dutch || Program Files || Common Files<br> |- | Finnish || Program Files || Common Files<br> |- | French || {{lang|fr|Programmes}} * || {{lang|fr|Fichiers communs}}<br> |- | German || {{lang|de|Programme}} || {{lang|de|Gemeinsame Dateien}}<br> |- | Hebrew || Program Files || Common Files<br> |- | Hellenic (Greek) || {{lang|el|Αρχεία Εφαρμογών}} || Common Files<br> |- | Hungarian || {{lang|hu|Programfájlok}} || Common Files<br> |- | Italian || {{lang|it|Programmi}} || {{lang|it|File comuni}}<br> |- | Japanese || Program Files || Common Files<br> |- | Korean || Program Files || Common Files<br> |- | Norwegian || {{lang|no|Programfiler}} || {{lang|no|Fellesfiler}}<br> |- | Polish || Program Files ({{lang|pl|Pliki programów (x86)}} for WoW64) || Common Files<br> |- | Portuguese || {{lang|pt|Programas}} || {{lang|pt|Ficheiros comuns}}<br> |- | Portuguese (Brasil)|| {{lang|pt|Arquivos de Programas}} || {{lang|pt|Arquivos comuns}}<br> |- | Romanian || Program Files || Common Files<br> |- | Russian || Program Files || Common Files<br> |- | Spanish || {{lang|es|Archivos de programa}} || {{lang|es|Archivos comunes}}<br> |- | Swedish || {{lang|sv|Program}} || {{lang|sv|Delade filer}}<br> |- | Turkish || Program Files ({{lang|tr|Program Dosyaları (x86)}} for WoW64) || Common Files<br> |- | colspan="3" | '''<big>*</big>''' In Windows Vista and later versions. (The folder name was the same as in English in the older versions of Microsoft Windows.) |- |}

==See also== *WinFS *File system *Directory (computing) *64-bit computing

==References== {{reflist}}

==Further reading== *{{cite book |last1=Karp |first1=David A. |last2=O'Reilly |first2=Tim |last3=Mott |first3=Troy |title=Windows XP in a nutshell |date=2005 |publisher=O'Reilly Media |isbn=978-0-5960-0900-7 |page=512 |edition=2nd}} *{{cite book |last1=Shilmover |first1=Barry |last2=Sjouwerman |first2=Stu |title=Windows 2000 power toolkit |date=2001 |publisher=Que Publishing |isbn=978-0-7357-1061-0 |edition=1st}}

==External links== *[https://support.microsoft.com/en-us/kb/933700 microsoft.com, Microsoft does not support changing the location of the Program Files folder by modifying the ProgramFilesDir registry value] *[https://devblogs.microsoft.com/oldnewthing/20131119-00/?p=2623 microsoft.com, Why is the Program Files directory called Program Files instead of just Programs?] *[https://gateway.sdl.com/communityknowledge?articleName=The-Windows-system-folders-General-overview, The Windows system folders - General overview.] *[http://superuser.com/questions/348079/how-can-i-find-the-short-path-of-a-windows-directory-file superuser.com, How can I find the short path of a Windows directory/file?] *[http://helpdeskgeek.com/windows-7/windows-7-64-bit-two-program-files-folders/ helpdeskgeek.com, Why Does Windows 7 64-bit Need Two Program Files Folders?]

{{Microsoft operating systems}} {{Microsoft}} {{CPU technologies}}

Category:File system directories Category:Microsoft Windows