Gotchas When Running 32-bit apps on 64-bit Windows

If you run 32-bit applications on 64-bit Windows you can encounter some peculiar problems. Having recently answered a question on Stackoverflow where it turned out Windows was loading a different file from the one they’d asked Windows to load, I’d thought I’d share a few tips on issues you can run into.

Filesystem Redirection

If a 32-bit application on 64-bit Windows attempts to access the System32 directory (usually C:\Windows\System32), it gets redirected to the SysWOW64 directory (usually C:\Windows\SysWOW64), though some subdirectories are exempt.

This can be a nasty surprise if your application really wanted to load something from, or write to, System32. There is a workaround by accessing a virtual subdirectory of the Windows directory called Sysnative, but that isn’t going to do much good to legacy applications.

More on this on MSDN, including the list of exempt subdirectories.

This also suffers from unfortunate naming, as you would naturally assume System32 would be for 32-bit applications, and SysWOW64 would be for 64-bit. The “WOW64” bit means Windows 32-bit on Windows 64-bit in Microsoft-speak.

Registry Redirection

32-bit applications are redirected to different nodes in the registry too when running on 64-bit Windows. This can be a nuisance both for applications of different architecture that want to share configuration properties between themselves, as well as for users who manually want to check or change registry entries.

If you are changing the registry for 32-bit application settings, remember that you may have to look in a node called Wow6432Node (again with the ambiguous naming). For example, what would normally have been HKEY_LOCAL_MACHINE\Software\MyApp, ends up in HKEY_LOCAL_MACHINE\Software\Wow6432Node\MyApp. If you want to see the registry through the eyes of a 32-bit registry editor, you can however load the alternate regedit.exe in your SysWOW64 directory (usually C:\Windows\SysWOW64\regedit.exe).

More on MSDN.

Separate Program Files Directory

The default Program Files directory for 32-bit applications is distinct from the one for 64-bit applications. It’s usually C:\Program Files (x86) (on English-language Windows anyway). At least the naming is a bit clearer this time, but the separation doesn’t seem to be useful in practice, and means there’s an extra place to look if you’re trying to find where your program installed itself to fix something or to find a file or directory not linked from a Start-Menu shortcut, etc. You’ll also find some applications (including some of Microsoft’s own) being split between the 32-bit and 64-bit Program Files directories.

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someonePrint this page

Comments are closed.

Comments are closed