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!

Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Selecting the Correct Registry node in 32/64 bit OS

Hi,

I'm attempting to make a mixed 32/64 installer package but I'm having some difficulties with registry settings. I have some registry values which install in HK_LM and HK_CU. Whilst the installer package works fine installing under 32 bit OS when I install under 64 bit OS the keys are written to the Wow6432Node but I need them to appear in the same place on both 32/64 bit registries.

Example:

The following value installed on 32 bit OS of "HK_LM\Software\My Company\My Software\v1\MyValue"

Converts to "HK_LM\Software\Wow6432Node\My Company\My Software\v1\MyValue" if installed in a 64 bit OS.

I need the value to be "HK_LM\Software\My Company\My Software\v1\MyValue" regardless of the OS version.

Hope my question makes sense and if so how can I achieve this?

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

Re: Selecting the Correct Registry node in 32/64 bit OS

Hello Trev,

To do so you should only mark the component of the related registry value as a "64-bit component". Just go to "Registry" page, select the related registry value and from its context menu choose "Go To Component" option. Then, in "Organization" page just check the "64-bit component" option for the selected component.

If you have any further questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Re: Selecting the Correct Registry node in 32/64 bit OS

Hi Dan,

Wow it's really that simple, the installer just works on 32bit OS even though the components are set to 64bit.

My next question is I have some Custom Actions which call batch files. On a 64 bit system they need to be launched as a 64 bit process. Is there a way for this to work in mixed installer by using a condition maybe?

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

Re: Selecting the Correct Registry node in 32/64 bit OS

Hello Trev,

For your BAT custom action scenario you can use two "Launch File" custom action type enabling or not their "Use 64-bit launcher" option. Then you should condition the 64-bit custom action using the following condition

Code: Select all

VersionNT64
and the 32-bit custom action using the following condition:

Code: Select all

NOT VersionNT64
Please take a look on our "Install resources based on the OS version" article for your reference.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Re: Selecting the Correct Registry node in 32/64 bit OS

Hi Daniel,

Thanks for all of your help to date, you have been most helpful.

I think, at least I hope this will be my final question.

How do I create an identical registry key which has a different value based on the OS bittedness?

For instance:

HK_LM\SYSTEM\CurrentControlSet\Control\Print\Monitors\Redirected Port with a value 'Driver - REG_SZ - redmon32.dll' for a 32bit OS

HK_LM\SYSTEM\CurrentControlSet\Control\Print\Monitors\Redirected Port with a value 'Driver - REG_SZ - redmon64.dll' for a 64bit OS

So the only part which differs above is the actual data of the value dependent on the OS bittedness.

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

Re: Selecting the Correct Registry node in 32/64 bit OS

You're always welcome Trev.

To fulfill your latest requirement, you can use an installer property (e.g. DLL_PROP) which will be set selectively to the desired value based on the OS architecture. Then, you can set the registry value to the above property formatted reference (i.e. [DLL_PROP]).

Here are the steps you can proceed with:
1. in "Install Parameters" page add a new property which will be set by default to the 32-bit value:
  • Name: DLL_PROP
    Value: Driver - REG_SZ - redmon32.dll
2. in "Custom Actions" page add a new "Set installer property" custom action with sequence, scheduled after "Install Execution Stage -> Searches" action group, which will use the VersionNT64 to set the "DLL_PROP" to the 64-bit value:
  • Property: DLL_PROP
    Value: Driver - REG_SZ - redmon64.dll
    Condition: VersionNT64
3. in "Registry" page set the registry value to:
  • Data: [DLL_PROP]
4. rebuild and test the project

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Re: Selecting the Correct Registry node in 32/64 bit OS

Perfect!

I now how my installer working perfectly under 32 and 64 bit OS. No need for 2 installer projects to maintain!

One last thing ... apologies ... :lol:

I've noticed that on the Organisation page there's a new component which has appeared in each of my features called "AI_ExePath" which is actually a registry entry like "HK_LM\Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]\AI_ExePath".

Is this a bi-product of having a mixed installer and is it required?

Thanks again for all of your help, this is a fantastic product, please keep up the good work!

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

Re: Selecting the Correct Registry node in 32/64 bit OS

Hello Trev,

Thank you for your positive words about Advanced Installer.

The "AI_ExePath" component contains a registry value which will be created at install time and where we store the path of the EXE setup at install time. This path is required bythe EXE setup packages create by Advanced Installer.

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

Return to “Building Installers”