Emulate 32-Bit OS On 64-Bit Windows: System32 Is The Name of The Folder That Contains Important Operating System Files
Emulate 32-Bit OS On 64-Bit Windows: System32 Is The Name of The Folder That Contains Important Operating System Files
Emulate 32-Bit OS On 64-Bit Windows: System32 Is The Name of The Folder That Contains Important Operating System Files
System32 is the name of the folder that contains important operating system files.
Early versions of 64-bit Windows XP only ran 64-bit applications. This made sense:
And since all the folders names stay the same, you can simply recompile your application
as 64-bit (and not have to change anything else - including your accidentally hard-coded
paths), and it will just work.
Emulate 32-bit OS on 64-bit Windows
Very quickly it became obvious that only being able to run 64-bit applications on 64-bit
Windows, would prevent some people from upgrading to 64-bit Windows. So an emulation
layer was created to allow you to run 32-bit applications on a 64-bit operating system.
It was called WOW64: Windows on Windows64:
This emulation layer simulates the x86 architecture, virtualizing the CPU, the file system, the
registry, the environment variables, the system information functions, all that stuff.
If a 32-bit program tries to look at the system, it will see a 32-bit system.
For example, if the program calls the GetSystemInfo function to see what processor is
running, it will be told that it's running on a 32-bit processor, with a 32-bit address space, in a
world with a 32-bit sky and 32-bit birds in the 32-bit trees.
And that's the point of the emulation: To keep the 32-bit program happy by simulating a 32-
bit execution environment.
The problem is where should these 32-bit applications store all their 32-bit files, and
configure the locations of their 32-bit DLLs, and load 32-bit operating system support files?
What Is System32?
RELATED: What Are DLL Files, and Why Is One Missing From My PC?
The System32 directory contains Windows system files, both .DLL library files used by
programs and .EXE program utilities which are a part of Windows. While most of the
files you find in here are part of the Windows operating system, third-party software
programs sometimes install their own DLL files to this folder as well.
Applications running on your system may be installed in your Program Files folder or
elsewhere, but they often load system-wide libraries from the System32 folder.
On a 64-bit version of Windows, you have a C:\Program Files folder containing 64-bit
programs and their files, and a C:\Program Files (x86) folder containing 32-bit programs
and their files. It’s helpful for these files to be separated because 64-bit programs need
64-bit DLL files, and 32-bit programs need 32-bit DLL files.
If a 32-bit program goes to load a DLL file it needs, finds a 64-bit version, and tries to
load it, it will crash. By separating 64-bit and 32-bit software into two different Program
Files folders, Windows ensures that they won’t get mixed up and caused problems.
However, not all DLL files are stored in Program Files. Many system-wide libraries
included with Windows are stored in C:\System32, and some programs also dump their
own library files here. So, just as Windows has separate 32-bit and 64-bit Program Files
folders, it also has separate 32-bit and 64-bit versions of the System32 folder.
On a 64-bit computer, 64-bit programs store their files in C:\Program Files, and the
system-wide C:\Windows\System32 folder contains 64-bit libraries. 32-bit programs
store their files in C:\Program Files (x86), and the system-wide folder is
C:\Windows\SysWOW64.
This is definitely counterintuitive. Despite the “32” in the name, the System32 folder
contains 64-bit libraries. And, despite the 64 in the name, the SysWOW64 folder
contains 32-bit libraries—at least on 64-bit versions of Windows.
In general, you won’t need to know this. The Windows operating system and programs
you use automatically place their files in the correct location and use the correct folder.
However, if you ever need to manually install a DLL file in the correct location or find
where one is installed—which is very rare—you’ll need to know which is which.
WOW64, Explained
The “WOW64” part of the name here refers to Microsoft’s “Windows 32-bit on Windows
64-bit” software, which is a part of the operating system. This allows Windows to run 32-
bit programs on a 64-bit version of Windows. WoW64 redirects file access to ensure
programs will work properly.
For example, if you install a 32-bit program on a 64-bit version of Windows and it tries to
write to the C:\Program Files folder, WoW64 points it at C:\Program Files (x86). And, if it
wants to access the C:\Windows\System32 folder, WoW64 points it at
C:\Windows\SysWOW64. Windows does this using a file system redirector.
This all happens automatically and transparently in the background. The program
doesn’t even have to know it’s running on a 64-bit operating system, which allows older
32-bit programs to run without modification on 64-bit versions of Windows. WOW64 also
redirects registry access, ensuring there are separate areas of the registry for 64-bit and
32-bit programs.
The answer seems to be that many 32-bit applications were hardcoded to use the
C:\Windows\System32 directory. When developers recompiled these applications for
64-bit versions of Windows, they continued to use the C:\Windows\System32 directory.
Rather than renaming the directory and forcing developers to move to the new one,
breaking many applications in the process, Microsoft left “System32” as the standard
system library directory. They created a new library directory for applications running
under the WoW64 layer, which they named “SysWOW64”. When you think about it this
way, the name makes more sense.
Yes, it is a bit silly that a directory with “32” in the name is now 64-bit. Perhaps Microsoft
should have seen that coming when they named it C:\Windows\System32 in the 90’s.
But, although a more straightforward naming scheme would be nice, it’s not worth
breaking a bunch of programs and creating more work for developers just to get there.
That means we’re stuck with System32 and SysWOW64 for the foreseeable future.