cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DataAnalyzer
Level 8

HKEY_USER_SELECTABLE and 64-bit

I have a component I created for registry settings. It has its regstry settings in the HKEY_USER_SELECTABLE section so it can be installed for the user or machine.

For machine installations on the 64-bit platform, it needs to be put in the root registry rather than the WOW3264Node. I learned I could change the registry component to a 64-bit component and that works. However, it then becomes a 64-bit components for the 32-bit build (setup). Is there a way to have the same component as 32 in one setup and 64 in another? Otherwise, I have to create two different components and manually keep them in sync forever.
Labels (1)
0 Kudos
(3) Replies
DemonPiggies
Level 7

If what I'm understanding you want the component to install in both the 32bit directory and the 64bit one, right? You can always let it install in the 32bit one and if the system is 64bit copy the file(s) into the 64bit one. Just add a Custom Action or add the "Installed(yourComponent)" handler to your script or add one after the install in OnFirstUIAfter().

I did something similar for some files in the System32 directory:

[LIST=6]
  • Create a parent feature.
  • Create a feature and name it "xxxx32bit" or whatever under that parent one.
  • Create a feature and name it "xxxx64bit" or whatever under that parent one.
  • Create your component.
  • Link that component in both the "xxxx32bit" and "xxxx64bit" feature.
  • In your code (I'm using InstallScript) create a switch that turns the "32bit" and the "64bit" features on or off based on the OS.


    or

    [LIST=5]
  • Create a parent feature.
  • Create a component and name it "xxxx32bit" or whatever.
  • Create a component and name it "xxxx64bit" or whatever.
  • Link that component in both the "xxxx32bit" and "xxxx64bit" feature.
  • In your code (I'm using InstallScript) switch the install path that turns the based on the OS.


    I'm using InstallScript so you'll have to either add some script or make a custom action or some such nonsense (lol). This way you only need that one component.

    Since the files I'm using are not dependent on the OS (well the file itself but the DLLs it uses are) I only created duplicate components...
  • 0 Kudos
    DataAnalyzer
    Level 8

    DemonPiggies,

    Thank you for your reply. I understand the ability to create two components to handle the 32 and 64 bit options. I've done that and made the second component 64-bit so that it's installed properly. What I'm trying to do is reduce the number of components so that I can more easily manage them over time.

    I'm already using the HKEY_USER_SELECTABLE branch to support the user's ability to install on either the USER or MACHINE branches of the registry.

    By having two components, I run the risk they get out of sync. I think I can resolve this if I can change the status of the component from 32 to 64 bit programmatically in the script.

    Any suggestions how to do so?
    0 Kudos
    DemonPiggies
    Level 7

    What do you mean by:
    I run the risk they get out of sync...


    And if it matters I forgot a step. In the first one, there are 2 features one labeled x32 and the other x64 but they are linked to the same component whereas the second one is about 2 components (labeled x32 and x64) but linked to the same physical file path. In my install the file isn't dependent on the system so I can place it where ever.

    There isn't any real syncing unless you the files in the component are structurely different or you are adding file after that component.

    I guess I'm a little confused on what you are trying to accomplish with reducing the number of components. One of my installers has over 35 components (I think I'm at like 40+ right now).
    0 Kudos