stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact:  Website

64-bit component

Mon Mar 09, 2009 5:37 am

When testing under Vista 64, I found that my AI-installed registry key permissions were not being set by the installer.

I then set the components containing the entries as "64-bit component" under AI, and it worked correctly.

However, the topic at http://www.advancedinstaller.com/user-g ... istry.html implies that I may need two sets of entries, one for 32 and one for 64 bit. But after marking my entries under AI as "64-bit component", they seem to work under Windows XP, at least, nonetheless.

Is this the expected behavior, or do I need two sets of entries?

My app is .NET, so since it supports both 32 and 64-bit by compiling for the target just-in-time, I assume it does not fall under the "mixed 32-bit/64-bit package" category.

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: 64-bit component

Mon Mar 09, 2009 12:52 pm

Hi,

On a 64-bit system the registry entries installed by a 32-bit package are created under the "Software\Wow6432Node" key. In order to avoid this, the components of the registry entries need to be marked as 64-bit. For more information please see the Packages Types how-to in the User Guide.

A 32-bit package on a 32-bit system will use these registry keys:

Code: Select all

HKEY_CURRENT_USER\Software
HKEY_LOCAL_MACHINE\Software
A 32-bit package on a 64-bit system will use these registry keys:

Code: Select all

HKEY_CURRENT_USER\Software\Wow6432Node
HKEY_LOCAL_MACHINE\Software\Wow6432Node
A 64-bit package on a 64-bit system will use these registry keys:

Code: Select all

HKEY_CURRENT_USER\Software
HKEY_LOCAL_MACHINE\Software
If your application supports both 32-bit and 64-bit platforms, you have two options:
1) Use a 32-bit package and the application uses the 32-bit locations on all systems (the "Wow6432Node" key on a 64-bit system).
2) Use a mixed 32/64-bit package and the application uses the normal locations for each system.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact:  Website

Re: 64-bit component

Tue Mar 10, 2009 10:45 pm

I have marked the component containing my registry entries "64-bit component", but they still seem to install correctly on XP 32-bit. Is that a bug or the expected behavior? Do I really have to create duplicate registry entries in AI to support 32 and 64-bit without Wow6432?

Also this is related to http://www.advancedinstaller.com/forums ... 883#p21883

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: 64-bit component

Wed Mar 11, 2009 10:22 am

Hi,
I have marked the component containing my registry entries "64-bit component", but they still seem to install correctly on XP 32-bit.
Windows Installer cannot install 64-bit components on a 32-bit system. I'm not sure how you configured your package. Can you please send us the AIP you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact:  Website

Re: 64-bit component

Wed Mar 11, 2009 4:01 pm

I've sent a simple example and I'll explain it here.

- The project creates a registry key "Your Company\Your Application\Test" and installs the file TestText.txt.
- The component containing the single registry entry is marked "64-bit component"
- the package is marked "Mixed 32/64 bit"

On both XP32 and Vista64, the registry key is created in "HKEY_LOCAL_MACHINE\Software\Your Company\Your Application\Test". You have said "Windows Installer cannot install 64-bit components on a 32-bit system", but it appears to be happening anyway. NOTE that for me, this is my desired behavior. But I don't know if it is an AI bug or a supported feature. If it's a feature, the UI is unclear.

Also note that in my testing, the key installed into the same registry location only if I included a file (e.g. TestText.txt) in the project. When I attempted to simplify the example by removing the file from the project, the Test registry entry was then created in HKEY_LOCAL_MACHINE\Software\Wow6432Node.

I reproduced these results several times with uninstalls between each test.

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: 64-bit component

Thu Mar 12, 2009 12:07 pm

Hi,

I checked with our developers and it seems that the packages created with Advanced Installer install 64-bit components on 32-bit systems (some warnings may appear in the installation log). I apologize for my mistake (I checked only the MSDN documentation). Since this is a feature and not a bug, you can use it for your package.

In conclusion, for the packages created with Advanced Installer the 64-bit component flag only tells Windows Installer where to install the component on a 64-bit system (in a 32-bit location or in a 64-bit location).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact:  Website

Re: 64-bit component

Fri Mar 13, 2009 9:08 am

Thanks Cosmin,

So currently I am supporting installation of a .NET AnyCPU application on XP32, Vista32 and Vista64 machines using the following:

- Install Parameters\Application Folder: [AIProgramFiles]...; and Package Type: Mixed 32/64... - results in all files, EXE and others, installing to ...\Program Files\... on both 32 and 64 bit systems. Note that for my purposes I canceled the Mixed 32/64 Package Organization Wizard, and modified organization per the following:

- Organization - setting the component that contains my app-specific registry keys to 64-bit results in the entries being created in the same HKLM location on both 32 and 64 bit systems (not Wow6432node).

- Organization - the component containing my file associations (which result in registry entries) is NOT set to 64-bit, but the associations still work on both 32 and 64 bit systems.

- Organization - the component containing my .NET AnyCPU EXE is NOT set to 64-bit, but the EXE still installs and runs on both 32 and 64 bit systems.

- Custom Actions - my VBS script (to delete a registry key), must be reused in two custom actions, one with "64-bit script" unchecked, and the other checked, in order to run on both 32 and 64 bit systems.

Return to “Common Problems”