|
Windows 64-bit: The 'Program Files (x86)' and 'SysWOW64' folders explainedIf you use a 64-bit computer with a 64-bit Windows installed (for example the 64-bit version of Windows 7) you have probably discovered that there are two new folders with the names Program Files (x86) and SysWOW64 on the hard disk, that do not exist on a 32-bit Windows. Maybe you have wondered what these folders are, why they exist and what kind of files they contain? In this article we will explain these folders and also explain why it is important to place with files with a specific bitness (32 or 64 bit) in the right folder on the hard disk. Advertisement 32-bit versus 64-bit computers and Windows Since the mid-90s almost all computers that have been sold have been 32-bit computers, and mostly they have had a 32-bit Windows installed. But after the release of Windows 7, the sales of 64-bit computers with a 64-bit Windows installed have increased a lot. In the coming years, more and more people will have a 64-bit computer with a 64-bit Windows in their home or office. One reason to this is that the price of a 64-bit computer have decreased so much that they are almost as cheap as 32-bit computers. And people will prefer 64-bit computers over 32-bit computers because they can handle much more (RAM) memory and they are generally faster because they use more modern technology. A 32-bit computer with a 32-bit Windows installed can use a maximum of 3 to 4 GB (RAM) memory. Mostly around 3 GB because a large part of the address space is used by video cards and other devices such as network cards, sound cards etc. This is true even if you install 4 GB in the computer. Mostly only around 3 GB RAM will still be used. With 64-bit computers and 64-bit Windows things are different. A 64-bit computer with a 64-bit Windows can handle so much RAM memory as 192 GB! On a 64-bit Windows, both 32-bit and 64-bit programs can be run Both 32-bit and 64-bit programs can be run on a 64-bit Windows. When a 32-bit program is run on a 64-bit Windows, a 32-bit emulator will be invoked to handle the 32-bit program.
During the installation, it is important to install files into correct folders As mentioned above the 32-bit emulator handles the situations when 32-bit programs are run on a 64-bit Windows and normally this works fine. But one sensitive phase is the installation of the 32-bit program. There exists special folders on the hard disk that is intended for 32-bit binary files only and it is very important that the installation program installs the 32-bit binary files to these folders. Some folders on the hard disk are intended for 32-bit binary files only and other folders are intended for 64-bit binary files only. If you place binary file with a specific bitness (32/64 bit) in a folder intended for another bitness the program will probably fail to work properly; in many cases the program will not even start. Examples of binary files that is mentioned in this article are EXE files (program files), DLL files and OCX files (ActiveX components). Data files can usually placed in same folders and shared by both a 32 and 64 bit application. Two different versions of the Program Files folder and the Windows System folder A 64-bit Windows has two different versions of the program files folder and the Windows system folder (system directory). One version is intended for 32-bit files and other version is intended for 64-bit files. The name of these folders, and the bitness they are intended for, is shown in the table below:
Below you can see the full path to the folders.
The 'System32' folder is for 64-bit files and the 'SysWOW64' folder is for 32-bit files This can be somewhat confusing, but the System32 folder is intended for 64-bit files and the SysWOW64 folder is intended for 32-bit files. This may seem a bit illogical if you look at the folder names, but there is an explanation to this. It has to do with compatibility. Many developers have hard coded the path to the system folder in their applications source code. They have included "System32" in the folder path. And to preserve compatibility, if the application is converted to 64-bit code, the 64-bit system folder is still named System32. But what about 32-bit applications that have the system path hard coded and is running in a 64-bit Windows? How can they find the new SysWOW64 folder without changes in the program code, you might think. The answer is that the emulator redirects calls to System32 folder to the SysWOW64 folder transparently so even if the folder is hard coded to the System32 folder (like C:\Windows\System32), the emulator will make sure that the SysWOW64 folder is used instead. So same source code, that contains a path with the System32 folder included, can be compiled to both 32-bit and 64-bit program code without any changes. So remember: • the SysWOW64 folder is intended for 32-bit files only • the System32 folder is intended for 64-bit files only It is very important that a binary file compiled to a specific bitness (32 or 64) is installed to the correct system folder. Otherwise the program that needs the file will not be able to load the file and will probably not work as expected.
The 'Program Files' and 'Program Files (x86)' folders If you have a 64-bit Windows installed on your computer you have probably already noticed that there exist two folders for program files: the Program Files folder and the Program Files (x86) folder. The Program Files folder is intended for 64-bit programs and the Program Files (x86) folder is intended for 32-bit programs. In many cases the program will start and run as expected even if you place the program in wrong folder, but if the program asks Windows for the path to the Program Files folder and want to access installed files in the folder, the wrong folder will be used and the program will likely fail to function. So to be sure that everything always works as expected, you should always install files with a specific bitness to the correct Program Files folder. So on a 64-bit computer with a 64-bit Windows, remember this: • always install a 32-bit program into the Program Files (x86) folder • always install a 64-bit program into the Program Files folder Supported by all Windows versions This method of naming 32 and 64 bit folders is supported by all 64-bit Windows that have been released on the market. Both client versions and server versions of Windows support this. The following versions of Windows support this naming system: Client operating systems: Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 Server operating systems: Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows Server 2016, Windows Server 2019
More information If you want to have more information about the different versions of the Program Files and System folder, and want to have a general overview of the WOW64 technology, you should read the Best Practices for WOW64 document at Microsoft's website (see the 64-bit System Archive section). More information is also available in these two articles on our website: The 'Program Files' folder in different languages The 'Sysnative' folder explained
Related products: SamLogic Visual Installer Other articles More articles are available from the article index page. |
|
Article written by: Mika Larramo | Spanish Swedish |