Posted on August 6th, 2009 by Darien Graham-Smith
How to make stubborn 32-bit apps work on 64-bit Windows
By now you’ve hopefully seen my feature on 64-bit Windows in the latest issue of PC Pro. And perhaps you derived some comfort from my breezy assurances that “you don’t need to worry too much about application compatibility. Almost all modern 32-bit software should install and run flawlessly on a 64-bit edition of Windows.”
Well, of course, whenever you write something like that you’re asking for trouble.
Sure enough, just as our September issue was landing on the newsstands, I was discovering that PC Pro’s internal CMS client only worked on – you guessed it – 32-bit Windows. Trying to create a new review from my 64-bit desktop yielded only an obscure error about a missing COM class factory.
Flying the flags
A little digging unearthed the problem. Some naughty developer had written a perfectly valid 32-bit .NET application, but had neglected to flag it as specifically 32-bit code. 64-bit Windows was therefore running it in 64-bit mode, causing errors when the software couldn’t access the 32-bit system resources it expected.
Luckily, this is an easy problem to fix. Microsoft’s CorFlags command line tool – part of the .NET Framework – lets you modify the header flags on executable files, including the one that specifies when an application needs to be run in 32-bit mode. Setting this flag for our database application was a simple matter of typing CorFlags application.exe /32bit+
And voilà – one 32-bit application running perfectly on 64-bit Windows. Worth a try if you ever run into a similar problem.
Which Program Files folder?
While I’m on the subject, here’s a related problem we ran into back when we started to review PCs running 64-bit Vista. In this case the troublesome software was none other than the PC Pro real-world benchmark suite. Everything appeared to install perfectly, but when we actually launched the tests we received “resource not found” errors.
I set about tracing the problem with the help of SysInternals’ indispensible Process Monitor utility, and once again, the explanation turned out to be mercifully simple (so simple, in fact, that I felt a bit foolish for not having worked it out myself).
Various files weren’t being found because on 64-bit Windows the “Program Files” folder is reserved for 64-bit applications only. 32-bit programs install into a folder named “Program Files (x86)”. Our test scripts included hard-coded paths that were failing because our 32-bit applications weren’t in their usual location.
If you come across a problem like this, you can easily fix it by removing explicit references to “C:\Program Files\” and using %ProgramFiles% instead (this clever environment variable should resolve to either “Program Files” or “Program Files (x86)” depending on whether the process calling it is 64-bit or 32-bit). If you can’t get at the source to change the paths, a quick and dirty workaround is to manually copy your 32-bit files into “Program Files”. Once I’d done this, our benchmarks ran without a hitch.
So there you have it: 32-bit applications do run on 64-bit Windows… but sometimes you need to work around a few programmer assumptions to get them going!
Tags: .Net, 32-bit, 64-bit, Windows
Posted in: How To, Random, Real World Computing, View from the Labs
Follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
5 Responses to “ How to make stubborn 32-bit apps work on 64-bit Windows ”
Leave a Reply
Authors
- Barry Collins
- Chris Brennan
- Christine Horton
- Darien Graham-Smith
- Dave Stevenson
- Davey Winder
- David Bayon
- David Fearon
- Ewen Rankin
- Ian Devlin
- Jon Honeyball
- Jonathan Bray
- Kevin Partner
- Mike Jennings
- Nicole Kobie
- Sasha Muller
- Steve Cassidy
- Stewart Mitchell
- Stuart Turton
- Tim Danton
- Tom Arah
Categories
- About the bloggers
- Android App of the Week
- CES 2013
- cloud computing
- From Gmail to Hotmail
- Green
- Hardware
- How To
- iPhone App of the Week
- Just in
- Microsoft Office 2010
- MWC 2013
- Newsdesk
- Online business
- Random
- Rant
- Real World Computing
- Software
- View from the Labs
- Web
- Windows 7
- Windows 8
Archives
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
advertisement


August 7th, 2009 at 9:05 am
Handy tip, thank you! I’ve been running Vista x64 for a while now, and ran into this very thing with CoPilot Central (desktop component of a Windows Mobile GPS program). Fortunately (given that my knowledge of such things is nil) I found a similar blog-post to this one that explained the work-around.
August 11th, 2009 at 1:01 pm
Perhaps I’ll go back and have another go. I’d like to run 64-bit Windows but hit a brick wall because my company uses Crystal Reports XI and I simply could not get it to work. If anyone has experience of this I’d love to hear from you.
January 2nd, 2012 at 10:47 am
I tried everything but the stupid program doesn’t work!!!
January 10th, 2012 at 9:26 am
Hi,
i want help i am using pcb software 32 bit version,if that company not providing 64 bit version,so we are using 64 bit os so i needthat sw work in 64 bit system what do
May 16th, 2012 at 1:09 am
http://www.softpedia.com/progDownload/Microsoft-Virtual-PC-Download-8335.html