Knowledgebase
How to run 32 bit application in 64 bit windows operating system?
Posted by Calvin O'Connor on 19 January 2012 05:59 AM

Generic Information

In general most 32-bit applications will work just fine in a 64-biit operating system, but there are some exceptions.  You also need to consider hardware compatibility with a 64-bit operating system.  One easy way to check if your hardware and applications will work would be to check the Windows 7 compatibility center:
http://www.microsoft.com/windows/compatibility/windows-7/en-us/default.aspx

From the compatibility center you can search for your hardware and applications by name and check both 32-bit and 64-bit compatibility.

Additionally, the Windows 7 Upgrade Advisor can be used to check your existing system for hardware and application compatibility.  The upgrade advisor scans your system and checks for possible compatibility issues with Windows 7 in general and then offers guidance on how to resolve them.
http://windows.microsoft.com/en-US/windows/downloads/upgrade-advisor

Applications which most commonly have compatibility issues are what are referred to as kernal mode applications and old 16-bit applications.  Examples might include old versions of DOS-based applications, anti-virus applications, old hardware which may not support 64-bit, etc.  Given the very broad ecosystem of hardware and applications, I strongly recommend the use of the compatibility center and upgrade advisor to help you make the determination.

 

Answer:

How to Run 32 Bit applications in Windows 64 bit operating system?

Windows 7 has taken root in the PC community over the last year, a great improvement from the little-liked Windows Vista, and we’ve made the 64-bit version the de facto standard on the computers we sell – to the point where we no longer even list the 32-bit version on our website. We can special-order it still, though, and I find that I am often asked by customers if they would be better off with that because they need to run older programs. This makes me think there may be some misunderstandings about 64-bit Windows out there, so let me set the record straight.

The last three editions of Windows – XP, Vista, and 7 – have all been available in both 32 and 64-bit versions. XP 64-bit was only rarely used, though, as it was the first step toward 64-bit computing that Microsoft took… and driver support was never very good, resulting in the vast majority of our customers from that era sticking with 32-bit. As memory (RAM) has become cheaper and more plentiful over the years, though, the ~4GB limit in 32-bit operating systems quickly became a sticking point, and thus when Vista debuted the 64-bit version was installed on a substantial amount of the computers we sold. That trend has only continued with Windows 7, and while that is the OS of choice for Windows users these days there is no problem running most older, 32-bit applications.

This is because Microsoft understands the importance of the backward-compatibility which has always been a hallmark of Windows operating systems, and indeed most programs are still written in 32-bit – either because they have not yet been updated to 64-bit, or because they have no need for the increased memory capacity that 64-bit gives access to. Specifically, a layer of processing was built into 64-bit XP, and has been inheritted by Vista and 7, called WoW64: Windows 32-bit on Windows 64-bit. It emulates much of the software environment 32-bit programs expect, to the point where most older software should work just fine. There are some limitations, unfortunately, but they only affect a small percent of the programs out there; if you want the details on that, you can read more on the Wikipedia page about WoW64.

Still, some folks run into trouble when trying to install or run an older application in Windows 7 64-bit. That can be due to one of the limitations I mentioned above or, more often, related to the added security settings in Windows 7. With XP and earlier versions of Windows, the default user account ran with administrator-level access – and so, therefore, did all programs executed by the user. Increasing online threats have led Microsoft to restrict default user priveledges, though, so older programs that are expecting admin-level access to the system may not function properly.

If you run into a program which doesn’t seem to work correctly, and you suspect it mayRun this program as administrator checkbox
need admin access, right-click on the icon or shortcut for it and select “Run as administrator”. If that fixes things, you can set a program to always run in that mode by right-clicking the icon again and going to Properties, then the Compatibility tab, and checking the box for “Run this program as an administrator”.

Compatibility Mode menu

Another valuable setting on the Compatibility tab is the Compatibility Mode option. When a program runs, the operating system is able to tell it what edition of Windows it is running on. Unfortunately, some programs try to be smart and look at that before starting up – and if the version of Windows they are told is not one that the software expects it may simply say it cannot run. I’ve also seen that happen when going to install a program, and when it happens it can be quite annoying. The way to work around this is to have Windows claim to be a different version – to lie to the program, in effect. That can be accomplished by selecting an older operating system from the Compatibility Mode drop-down menu, again in the Properties for an icon, shortcut, or program. If you are running into this when trying to install software, you will need to track down the executable which is trying to run and right-clicking on it to change this setting. You may also need to try a few different Windows version settings, to find one that the software accepts.

Lastly, if neither of the above helps, you can run a different version of Windows – whatever one your software needs – from within a Virtual Machine.  That is a type of program that lets you run one operating system within another – a great tool for testing different OSes, or even isolating certain types of work (like visiting suspicious websites) from the rest of your computer.  For the purpose of running older software, having a virtual machine of Windows XP would give a lot more flexibility in terms of running programs with specilized needs.  Knowing that, Microsoft actually provides a streamlined solution to give their customers just that: XP Mode.  It is a free download for anyone with Windows 7 Professional or Ultimate (but not the Home editions) and, for those of our customers who know they need it, we can often pre-install it when building a computer.

XP Mode

For Developers (Please don't try this if you're not sure)

Windows 32-bit on Windows 64 (WOW64)

WOW64 emulates 32-bit Windows

Under Windows 64-bit, 32-bit applications run on top of an emulation of a 32-bit operating system that is called Windows 32-bit on Windows 64-bit, or WOW64 for short.  WOW64 intercepts all operating system calls made by a 32-bit application.

For each operating system call made, WOW64 generates native 64-bit system calls, converting 32-bit data structures into 64-bit aligned structures. The appropriate native 64-bit system call is passed to the operating system kernel, and any output data from the 64-bit system call is converted into a format appropriate for the calling application before being passed back.

Like 32-bit applications, WOW64 runs in user mode so any errors that occur in translating an operating system call will only occur at that level. The 64-bit operating system kernel cannot be affected.

Since WOW64 runs in user mode, all 32-bit application code must also run in user mode. This explains why 32-bit kernel mode device drivers and applications that rely on them, will not work under Windows 64-bit.

The WOW64 emulator consists of the following DLLs, the only 64-bit DLLS that can be loaded into a 32-bit process:

Wow64.dll – the core emulation infrastructure and the links to the Ntoskrnl.exe entry-point functions.
Wow64Win.dll – the links to the Win32k.sys entry-point functions.
Wow64Cpu.dll – switches the processor from 32-bit to 64-bit mode.
Ntdll.dll – 64-bit version.

Wow64.dll loads the 32-bit version (x86) of Ntdll.dll and all necessary 32-bit DLLs which are mostly unmodified 32-bit binaries..However, some of these DLLs have been modified to behave differently on WOW64 than they do on 32-bit Windows. This is usually because they share memory with 64-bit system components.

WOW64 manages file and registry settings

In addition to handling operating system calls, the WOW64 interface needs to ensure that files and registry settings for 32-bit applications are kept apart from those for 64-bit applications. To achieve this two mechanisms are used, File and Registry Redirection and Key Reflection. Redirection maintains logical views of the data as if it were in 32-bit Windows and maps it to the correct physical location. Reflection ensures that 32-bit and 64-bit settings will be consistent where that is required.

File Redirection

File redirection ensures that there are separate folders for program and operating system files for 32- and 64-bit applications.

32-bit applications files are installed into

C:\Program Files(x86)

32-bit system files are installed into

C:\WINDOWS\SysWOW64

For 64-bit applications, files are installed to:

C:\Program Files
C:\WINDOWS\SYSTEM32

The WOW64 file redirector ensures that requests from 32-bit applications to open files in C:\Program Files or C:\WINDOWS\SYSTEM32 are redirected to the appropriate 32-bit directories.

There is one issue with file redirection that users and developers should be aware of.

Many 64 bit applications still use 32 bit installation routines. To ensure that an application is installed correctly, i.e. to C:\Program Files, the installation routine should make an operating system call to temporarily suspend the WOW64 file redirector. After installation another operating system call needs to be made to re-enable the redirector. If this approach isn't followed then the application will be installed to C:\Program Files (x86). A classic example of this is the 64 bit development version of Firefox 3.5, codenamed Shiretoko, which is installed to C:\Program Files(x86)\Shiretoko. Firefox still functions correctly, the only thing you can't do is change the icon for the application.

Registry Redirection

Registry keys specific to 32-bit applications are redirected from:

HKEY_LOCAL_MACHINE\Software

to:

HKEY_LOCAL_MACHINE\Software\WOW6432Node

You may also occasionally see Registry entries elsewhere although this is unusual

HKEY_CURRENT_USER\Software\WOW6432Node

This approach allows both the 32-bit and 64-bit versions of an application to be installed side-by-side without overwriting each other’s settings.

Registry reflection

Some redirected keys and/or values are also reflected. This means that if a 32-bit application makes a change to the redirected section of the registry, that change is also made to the 64 bit part of the registry, and vice-versa. Key reflection uses a policy of last writer wins. For example, if I install three applications with the same file extension then the last one to be installed will be associated with that extension.

  1. Install a 32-bit application that associates itself with the file extension XYZ.

  2. Install the 64-bit version of this application that associates itself with the file extension XYZ.

  3. Install another 3- bit application that associates itself with the file extension XYZ.

Double-clicking on a file with the extension XYZ in Explorer would load the application installed in step 3, as it was the last one to associate itself with this extension.

All of this is done transparently for 32-bit applications by WOW64, which, in intercepting calls to the operating system, detects references to file paths and registry keys and maps them accordingly.

WOW64 has several limitations

Some but not all 64-bit features are available to 32-bit applications

WOW64 provides 32-bit applications with access to some features of 62-bit systems. For example, applications can have more memory up to 4GB with the correct setting.. Other features are more limited due to overheads and restrictions. For example, 64-bit Windows will support logical 64 processors but 32-bit applications are restricted to the usual 32 logical processors.

Code Injection cannot mix between 32-bit and 64-bit

Under 64-bit Windows it is not possible to inject 32-bit code into a 64-bit process, nor is it possible to inject 64-bit code into a 32-bit process. Applications that rely on code injection to add functionality to existing applications will usually not work.

This explains why most 32-bit shell extensions do not work under Windows 64-bit. The majority of shell extensions rely on code injection to add themselves to Windows Explorer.

WOW64 does not support 16-bit installers

WOW64 provides support for Microsoft's 16-bit installer - by substituting a compatible 32-bit installer - but does not extend this support to third-party products.

 

Further options for running 32-bit applications with Windows 64-bit

Windows Virtual PC

Windows Virtual PC is free software that provides an environment that will support legacy hardware and software that will not work under Windows 7. Guest operating systems (OS) can run in a virtual machine which means they are not aware that they are running under another operating system.

The system requirements and features vary significantly between versions of Virtual PC and versions of Windows so check before you try Virtual PC. The latest version is, perhaps, the most limited with no support for operating systems before the current supported version of Windows XP which is Service Pack 3.

Windows XP Mode (XPM)

Windows XP Mode  is a specific implementation of Windows Virtual PC that comes with a pre-installed, licensed copy of Windows XP Professional with Service Pack 3. It is only available with the Enterprise, Ultimate and Professional editions of Windows 7 64-bit so you are expected to upgrade to these versions if you want it.

Many who have used XPM advise that it should be used as a last resort. It will provide legacy support if you have no other options but, compared to other virtualization products, performance is disappointing and the default configuration raises a number of security issues.

Dual boot Windows

You can install more than one version of Windows on the same computer by dual booting.For the purposes of this article, you would install a 32-bit version and a 64-bit version alongside each other. Each operating system is installed into its own disk partition and a boot manager is installed on the default partition to ensure that you can choose which operating system you want to use at startup.

Although you cannot use both operating systems at the same time it is a useful option because the entire computer is dedicated to the running operating system. Compared with virtual machines, there are no issues of compatibility and much less complexity in both installation and operation. You can also retain the ability to run 16-bit applications under the 32-bit version of Windows.

Summary

Most 32 bit applications will run quite happily under Windows 64. The main exceptions are:

  1. 32-bit device drivers.
  2. Applications that cannot function without the 32-bit device drivers that they use. Prime examples are antivirus, antimalware and firewall applications.
  3. Application extensions that rely on code injection into, for example, Explorer.

Some applications may work with reduced functionality. These include uninstallers, registry cleaners and tweaking programs, amongst others, since they only have access to that part of the Registry made visible to them by WOW64.

If you cannot run your 32-bit applications then consider virtualization or dual-booting with the old and new operating systems both installed.

 
Related Links

Celframe Founder Arun Pudur Talks in CEO Forum

(83 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment 
 
Full Name:
Email:
Comments: