Registry searches in mixed 32/64 installers change paths - Advanced Installer Community
eu_neke
Posts: 4
Joined: Thu Aug 09, 2012 5:57 am

Registry searches in mixed 32/64 installers change paths

I'm building a mixed 32/64-bit installer which does registry searches to find the location of an existing product.

I have two searches set to "Search the 64-bit portion of the registry":
  • One value contains the path to the 32-bit components of the existing product, which is usually something like C:\Program Files (x86)\AppName. This search works fine.
  • One value contains the path to the 64bit components of the existing product, which is usually something like C:\Program Files\AppName. This doesn't work - it gets rewritten to C:\Program Files (x86)\AppName!
A little poking around indicates that if the string in the registry starts with one of WOW64's virtualized paths, the search will return the modified path instead - i.e. C:\Program Files will return C:\Program Files (x86), C:\Windows\System32 returns C:\Windows\SysWOW64.

Is there any way to disable this rewriting? It makes it pretty much impossible to install our product in the right place.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry searches in mixed 32/64 installers change paths

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I've tested your scenario using version 9.4 of Advanced Installer, but I cannot reproduce the behavior. Can you give us more details about your scenario (maybe exemplify)? Also, can you attach a sample reproducing the behavior?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sebastian
Posts: 5
Joined: Mon Feb 16, 2015 9:59 am

Re: Registry searches in mixed 32/64 installers change paths

Sorry for rewarming this old thread, but I seem to have the same problem.
We are using Version 6 and we are wondering if this is a bug or will be the same in future Versions.

So this is the repro
The AI runs on Windows 8.1 64.
In the registry (64bit) there is a path HKEY_LOCAL_MACHINE\SOFTWARE\Vendor\Product\7.0x64\Install
it has a REG_SZ InstallPath="c:\Program Files\Product 7 (64-bit)\"

My search is:
REGPRODUCTPATH
Idenfication
Root: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Vendor\Product\7.0x64\Install
Name: InstallPath
Type: Retrieve the Raw Value
[X] Seach the 64-bit portion of the registry

WhenI run that (Test and later the installer) the result is:
1: C:\Program Files (x86)\Product 7 (64-bit)\
(Note the x86)

But Sysinternals Procmon shows the correct value:

Date & Time: 16.02.2015 10:20:18
Event Class: Registry
Operation: RegQueryValue
Result: SUCCESS
Path: HKLM\SOFTWARE\Vendor\Product\7.0x64\Install\InstallPath
TID: 9232
Duration: 0.0000201
Type: REG_SZ
Length: 80
Data: c:\Program Files\Product 7 (64-bit)\

(i.e. no x86)

Since there is no replacement function, I would need the correct (unmodified) value.
How can I achive that

Regards
Sebastian
Sebastian
Posts: 5
Joined: Mon Feb 16, 2015 9:59 am

Re: Registry searches in mixed 32/64 installers change paths

Hi,
I just installed an evolution copy of Advanced Installer 11.8.
It shows the same behaviour. The path (containing c:\Program Files) seems to be replaced by a path containing c:\Program Files (x86)\.
What's even more strange: When I browse into the Registry Path that has the setting: No names and values are shown. Just the tree-structure.

Please advise what might be wrong

Sebastian
Sebastian
Posts: 5
Joined: Mon Feb 16, 2015 9:59 am

Re: Registry searches in mixed 32/64 installers change paths

I guess this is a real problem in AI

I investigated with the registry browser in AI and it seems the Keys (left side tree) are read 64bit while the Values (right side panel) are first 32 bit and 64 bit only if 32bit exists.

Lets say Vendor exists exist as HKLM\SOFTWARE\Vendor and HKLM\SOFTWARE\Wow6432Node\Vendor
Now the Product is only 64bit so we have SOFTWARE\Vendor\Product but we DON'T have SOFTWARE\Wow6432Node\Vendor\Product

If you add a Value REG_SZ BITS=64 in SOFTWARE\Vendor\Product (using the registry) then it is not visible in Advanced Installer 11.8 registry browser.

As soon as there is SOFTWARE\Wow6432Node\Vendor\Product, the 64bit(!) Value of SOFTWARE\Vendor\Product becomes visible.

And actually I'm afraid there is a kind of 32/64 mixup in the Program that Converts c:\Program Files to c:\Program Files (x86) inside my Value for no reason.


Sebastian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry searches in mixed 32/64 installers change paths

Hello Sebastian,
I just installed an evolution copy of Advanced Installer 11.8.
It shows the same behaviour. The path (containing c:\Program Files) seems to be replaced by a path containing c:\Program Files (x86)\.
What's even more strange: When I browse into the Registry Path that has the setting: No names and values are shown. Just the tree-structure.
Unfortunately, this is the standard behavior of the Windows Installer "AppSearch" standard action. Please take a look on the "64 bit Registry problems" thread which debates the same topic.

Let us know if this helped, otherwise please send us the .aip (project file) to support at advancedinstaller dot com so we can investigate its settings.
I investigated with the registry browser in AI and it seems the Keys (left side tree) are read 64bit while the Values (right side panel) are first 32 bit and 64 bit only if 32bit exists.

Lets say Vendor exists exist as HKLM\SOFTWARE\Vendor and HKLM\SOFTWARE\Wow6432Node\Vendor
Now the Product is only 64bit so we have SOFTWARE\Vendor\Product but we DON'T have SOFTWARE\Wow6432Node\Vendor\Product

If you add a Value REG_SZ BITS=64 in SOFTWARE\Vendor\Product (using the registry) then it is not visible in Advanced Installer 11.8 registry browser.

As soon as there is SOFTWARE\Wow6432Node\Vendor\Product, the 64bit(!) Value of SOFTWARE\Vendor\Product becomes visible.
You can see my reply on "Registry Browse hides 64bit values when the 32bit key is N/A" thread.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”