We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mikethetv
Posts: 5
Joined: Wed May 22, 2013 11:01 am

Separate 32 and 64 bit installers both update Wow6432Node

Hi
We create separate 32 and 64 bit EXE installers from a set of 32 and 64 bit MSM packages. The MSM packages contain various components which are either unique to the installer or shared by several product installers, for example the exe for the application being installed (unique), documents for the application (unique), various shared libraries used by the application (common), etc. We generate separate 32 and 64 bit installers as this fits more easily in our automated build process so ideally we want to stick with this.

The problem I am having is that we want to be able to allow both a 32 bit and 64 bit install of the application onto a Windows 7 64 bit machine simultaneously. All the MSM and top level EXE installers have unique GUIDs so there is no issues in having the side by side installations, in addition all files are stored in unique directories, for example bin/bin64 and lib/lib64. Previously this all worked fine as we had a launch batch file for the 32 or 64 bit application which determined the appropriate 32 or 64 bit executable to run and set up the paths appropriately. However as our application requires administrator privileges to do certain operations, and now under Windows 7 this is a lot more involved than simply ensuring the user running the application is in the local administrator group, we have moved to embedding a UAC privilege request manifest into the application. As such the batch file approach does not work due to paths not being inherited, etc. to a privileged application, so I now need to add registry keys in

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\<our app.exe>

for the 64 bit application and

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\<our app.exe>

for the 32 bit application with the (Default) and Path keys set to the appropriate architecture dependent executable and directories respectively.

So I added these registry keys to the MSM which contains the application. For both the 32 bit and 64 bit MSM projects I simply added the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\<our app.exe> keys as I assumed the installer would sort out appropriately that on a 64 bit install that was the correct path and on a 32 bit it should be redirected to the Wow6432Node version.

However when I install the 32 bit installer on the Windows 7 64 bit machine I first get the (Default) and Path keys for the 32 bit application written to both registry trees (32 and 64 bit), but when I install the 64 bit installer it also writes to both, hence breaking the 32 bit install in Wow6432Node as the path is not invalid.

I found a tutorial on 32/64 bit registry keys http://www.advancedinstaller.com/user-g ... istry.html but that seemed to be specific to the case of a mixed 32/64 bit installer. However I tried various suggestions from it including marking the Organisation containing the (Default) and Path keys as a 64-bit Component in the 64 bit MSM. This did not seem to have any effect. I then tried the option to Disable Registry Reflection again on the 64 bit MSM thinking from the description that this would stop it writing through to the Wow6432Node keys as well. This however also failed.

I am now out of ideas on this one and would appreciate any help.

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Separate 32 and 64 bit installers both update Wow6432Nod

Hi and welcome to Advanced Installer forums.

I've tested your scenario, but I cannot reproduce the behavior. Simply, going in the Organization page and selecting the "64-bit Component" option for the components that contains my registry entries does not install them under the "WOW6432Node".

Can you please test this in a new project and see if the behavior persists?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mikethetv
Posts: 5
Joined: Wed May 22, 2013 11:01 am

Re: Separate 32 and 64 bit installers both update Wow6432Nod

Hi
Thanks for the reply. I will try it with a new project.

Is there likely to be anything in the fact I am trying to set the registry settings in an MSM rather than the top level MSI/EXE installer?

Cheers
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Separate 32 and 64 bit installers both update Wow6432Nod

Hi,

Trying to set the registry settings in a MSM should not be a problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mikethetv
Posts: 5
Joined: Wed May 22, 2013 11:01 am

Re: Separate 32 and 64 bit installers both update Wow6432Nod

OK I have recreated a very simple installer as follows:

- Create a set of files for the 32 bit installer, simply added a text file called Application.txt to a bin folder.
- Created a 32bit MSM module AIP using the wizard named My 32 bit MSM Module.
- Added sync folder to my bin directory.
- Added a registry key in the Registry section for HK_LM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Application.exe by simply right clicking on the parent and doing New Key all the way down to the leaf key.
- Added new values for the (Default) and Path containing specific path values referencing the [APPDIR]\bin.
- Went to Organisation and selected property for the registry key. Initially there were two, one for the (Default) and one for the Path values but I moved these under the same component. In the properties neither 64-bit Component or Disable Registry Reflection are checked.
- Saved and built MSM.

For the 64 bit MSM I did the same as above but pointed it at the bin64 folder and set the registry keys to include bin64. I also checked the 64-bit Component in the Organisation for the registry keys.

Then I created a 32 bit MSI/EXE projects as follows:

- Used the wizard to create a 32 bit EXE installer called My 32 bit Application.
- Added the My 32 bit MSM Module merge module.
- Saved and built.

As before I created a 64 bit MSI/EXE installer as for the 32 bit one but modified the name and also which MSI it used. The package type was also changed to 64 bit for x86/AMD64.

Now when I install the 32 bit installer I get the files where I expect in bin but again registry entries containing 32 bit paths in both HK_LM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Application.exe and HK_LM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\Application.exe.

If I now install the 64 bit installer the files are put in bin64 but again both registry sections are updated with the 64 bit paths over writing the 32 bit paths.

BTW I am using Advanced installer 8.0.2, but have tried later versions with identical problems.

I must be doing something wrong here but what :?

Added a zip of my project if that's any help.
Attachments
Test Installer.zip
MSM and MSI/EXE installer AIPs and test files.
(8.5 KiB) Downloaded 740 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Separate 32 and 64 bit installers both update Wow6432Nod

Hi,

The entries created under HK_LM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths key are automatically shared by the Operating System between WOW6432Node and non-WOW6432Node.

The Registry Keys Affected by WOW64 article explains this behavior and also lists the registry keys that are shared, redirected or reflected.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mikethetv
Posts: 5
Joined: Wed May 22, 2013 11:01 am

Re: Separate 32 and 64 bit installers both update Wow6432Nod

Hi
I did find that MS article but maybe I misinterpreted the meanings of shared and redirected in the two columns.

Basically then, if I understand it correctly, I can't install a 32 bit and 64 bit application, with the same name but in different directories, and use the App Paths feature. That seems rather restrictive to me and quite unintuitive that the information for a 64 bit application gets also put in the 32 bit registry tree under Wow6432Node.

I suppose the only solution is to change the name of one of the applications or live with the fact that if you install one after the other it breaks the first one.

Cheers
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Separate 32 and 64 bit installers both update Wow6432Nod

Hi,

Indeed, adding 32-bit and a 64-bit registry entries with the same name under the App Paths key seems to be limited by the Operating System. As you mentioned, I think that an acceptable workaround would be to change the name of one application (i.e. adding "64" in the name of the 64-bit application).

Also, you can maybe find more information, even better workarounds on the Microsoft forums.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”