codesynergy
Posts: 100
Joined: Fri Nov 14, 2014 10:29 pm

Components and Registry Entries

Hello again. I have a few questions regarding components and registry entries. I'm using AI 11.7.

1) What is the best way to attach registry entries to an existing component (when importing from a registry file)? When I import registry entries from a registry file, they are added as new components. I want to attach these registry entries to existing components. The only way I could figure how to do this is to import the registry entries (in the registry view), switch to the organization view, then drag/drop each registry entry to the component I want it attached to. This certainly isn't practical for hundreds/thousands of registry entries. It sounded like there was improvement in this area a few versions ago: http://www.advancedinstaller.com/forums ... =1&t=21456 , but I couldn't figure out a better way than the drag/drop method.

2) InstallShield has a feature "REG File To Merge At Build", where you can point to a registry file, and InstallShield will import the registry entries into the component at build time. Is there anything similar in AI? *Feature request*

3) I have the following setup, which is similar to a mixed 32/64 project, but I'm setting up everything manually.

Code: Select all

Media view:
Build32
Build64

Organization view:
FeatureA_32 (Included only in Build32)
	ComponentA_32
		App.exe (32bit)		

FeatureA_64 (Included only in Build64)
	ComponentA_64
		App.exe (64bit)
I have a registry file (App.reg) that I want to import into both ComponentA_32 and ComponentA_64. How can I accomplish this? The only way I could find is here: http://www.advancedinstaller.com/user-g ... istry.html . Once again though, this becomes a bit impractical when dealing with hundreds/thousands of registry entries. In theory, I should be able to add these registry entries to both ComponentA_32 and ComponentA_64, since only one of these components will exist in the MSI (since I exclude the parent features based on the build). I think InstallShield gets around this using the feature I mentioned above.

4) Related to question 3, how do I handle COM/Interface/TypLib registry entries that also need to be added twice (32bit and 64bit)? COM registry entries are being added to the "COM" view (instead of the registry view), and it doesn't look like I can use the above method (http://www.advancedinstaller.com/user-g ... istry.html) in this view?


In the end, I'm trying to figure out how to best address my setup (as shown in question 3). I have 32bit and 64bit components that use the same registry entries (some of which will be COM/Interface/TypLib), but it doesn't seem like I can add the same registry entries to both components (at least, not very easily).


Thanks.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Components and Registry Entries

Hi,

1) The improved you found mentioned in the other forums topic does not address your requirement, it is just similar.
Regarding your desire to organize all registry entries under a single component, I must recommend against doing that. The reason
why Microsoft recommends having each registry entry with its own component, and why we follow that recommendation, is because the self-healing mechanism
can easily detect a missing registry value and automatically repair the installation.

If you have all entries in a single component, the system can detect and trigger the self-repair only if a certain registry entry is missing, the one that is set as keypath file.
So if any other registry value will be missing the self repair will not start.

My recommendation is to create a new feature, that you include in both builds as you would do with the component, and import the registry entries under that feature
(i.e. set it as current feature).

2) We do not have such a feature. We'll take it into account for future versions, but more people need to ask for it.

3) Indeed the article you linked here is not what you need. In this case the solution I mentioned at point 1) would work, with the new feature that contains only the
registry entries and gets included in both builds.

4) Well, in this case you'll need to use a little hack as we don't fully support this but we already have plans to improve it. First, you need to have two reg files, one for the 32 bit entries
and one for the 64-bit entries. The reg file for containing "Wow6432Node" in the registry paths needs to be modified, by adding for each path the property [COM_PROP1], as you can see in the attached sample file.

Bogdan
Attachments
Outlook2013_C2R_32_on_64.zip
(1.29 KiB) Downloaded 647 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codesynergy
Posts: 100
Joined: Fri Nov 14, 2014 10:29 pm

Re: Components and Registry Entries

Thanks for the response! In regards to the first point:

Note that I only want all registry entries associated with the component's dll/exe under that single component, not every registry entry in the project. For example:
All registry entries related to foo.exe attached to the foo.exe component, where foo.exe is set as the key file.
All registry entries related to bar.dll attached to the bar.dll component, where bar.dll is set as the key file.
etc.

So, basically, the same as what the auto registration would do (I think), except I have some registry entries that I want to import from a file.
The problem with the proposed solution of having a single feature containing all registry entries: the install-state of the registry entries is no longer dependent on the install state of the related component. For example, if foo.exe is under a feature that is not installed, the registry entries relating to foo.exe would be installed anyways. So, I would almost have to create a "Registry" feature for every single sub group of features to make this work. This seems very messy.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Components and Registry Entries

Hi,

Indeed, there is the problem you mentioned and that currently has no workaround. I thought that maybe the features are controlled only by
you inside the installer, and the users can never select them manually, this way being sure you are always installing the right EXE and its correspondent
registry entries.

I've discussed your request with the leader on development of this part from Advanced Installer and decide to extend the support for importing registry,
to allow our users to set a target component under which all registry to be imported. It will be implemented in a future version, but I cannot say exactly which one,
it depends on other feature requests too.

Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codesynergy
Posts: 100
Joined: Fri Nov 14, 2014 10:29 pm

Re: Components and Registry Entries

I've discussed your request with the leader on development of this part from Advanced Installer and decide to extend the support for importing registry,
to allow our users to set a target component under which all registry to be imported. It will be implemented in a future version, but I cannot say exactly which one,
it depends on other feature requests too.
That would be great. Thanks!
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Components and Registry Entries

Hello,

This improvement has been added in version 12.3 of Advanced Installer released on July 16th, 2015.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”