32/64 bit locations

While I have known for some time that Windows stores registry keys in different locations based on the application being 32 or 64 bits today I also discovered that for Services the SpecialFolder.ApplicationData folder is also different.

A 64bit Service will see the application data at C:\\Windows\\System32\\config\\systemprofile\\AppData\\Roaming\\
while a 32bit Service will see the data at C:\\Windows\\SysWOW64\\config\\systemprofile\\AppData\\Roaming\\.

The native path of both however will appear to be C:\\Windows\\System32\\config\\systemprofile\\AppData\\Roaming\\ when using the folder item native path.

In the registry you’ll find an added WOW6432Node layer.

32bit ODBC is Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\ODBC
while 64bit is Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\ODBC

Windows automagically maps these settings for 32 bit apps on 64bit OS’s.

If you use the MBS Registry classes, you can use Use64bitRegistry parameter on the RegistryKeyMBS.CreateKey, RegistryMBS.Key and RegistryMBS.getStringValue methods to decide if your 32-bit app wants to edit 32 or 64bit registry.
see
http://www.monkeybreadsoftware.net/class-registrymbs.shtml

Thank you @Christian Schmitz my conversation starter was informational rather than advertorial, but I have no problems with you promoting your add-ons here.

Great. See you at the next conference!

I’d love to attend, you paying?

Well, this week in Berlin I pay a lot.

You never know what things cost beforehand.