Friday, 16 May 2008

Registry on 64 bit Windows

The world is slowly but surely moving to 64 bit but along the way there are a few wrinkles to work out.

At XSOL we develop tools that people use to model their business processes. They can do that as an end in itself e.g. for internal documentation or they can press a button and we produce a custom line of business application for them with a SQL back end etc. We use Python for application extensibiity.

A customer was having trouble getting our installer to run on their 64 bit machine. The installer checks for the presence of Python (which they have to install separately for licensing reasons) by looking in the registry. It was failing to detect that they had Python installed.

It transpires that our code that checked for the presence of Python was in a 32 bit DLL. Windows 2003 64 bit (and Vista 64 bit) does a bit of magic when 32 bit apps look at the registry, like the magic it does about the location of the "documents and settings" folder etc. Long story short, we had to create an entry in the right place just to fool our installer.

On a 32 bit OS we look at

HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState \ActivePython \2.5.1.1

On a 64 bit OS running our 32 bit detection code we think we are looking there but we are actually looking at

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node \ActiveState \ ActivePython\2.5.1.1

There is of course a KB entry about this: http://support.microsoft.com/kb/896459

No comments: