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

Registry Bug

Hi!

I think I found a bug (IMHO a very significant bug) with the handling of registry entries in AI. Reproducing the bug (using AI 11.8):

• I have a project that is set up similarly to a mixed 32bit/64bit project, but I set up everything manually. I have two builds (Build32/Build64). I have a set of 32bit features that are only included in the 32bit build (containing 32bit files), and I have a set of 64bit features that are only included in the 64bit build (containing 64bit files).
• I have 19 32bit files that I set Auto Registration option on (Extract registration info from native library - synchronization disabled).
• I then set the Auto Registration on another 32bit file (MyFile32.dll), which is only included in the 32bit build.
• I then set the Auto Registration on the 64bit version of this file (MyFile64.dll), which is only included in the 64bit build.
• Result: The 64bit version of the file (or rather, the file's component) does not contain all the registry entries that the 32bit version does. In my specific case, the 64bit version is missing all of the Interface\<guid> entries.

What I've noticed so far:

• I don't think the issue is with the actual registry extraction part, because of the following reasons:
o In my above scenario, if you set the Auto Registration on MyFile64.dll first, then MyFile32.dll will be missing the registry entries.
o If I start with a clean project (no registry entries and no other files), I can set Auto Registration on MyFile32.dll amd MyFile64.dll, and all the registry entries are there for both files. I'm guessing the issue does not occur here, because no collisions occur, since there are only two files being registered.
• So, I'm guessing the issue has something to do with the functionality that tries to add the registry entries into the AI project. I'm thinking it may be a registry collision issue, where AI thinks the registry entry has already been added and can't add it again. Maybe related to the whole [COM_PROMP1] thing?
• I've seen this issue with other dlls in my project. I think there is a tipping point, where so many registry entries have been added, then collisions start happening.
• Importing a registry file results in the same behavior. Since you can't import a registry file into a component, this wouldn't be a solution anyways.
• Setting synchronization to "Buildtime" results in similar behavior.


So, I'm basically dead in the water at this point. It's basically impossible for me to include all the necessary registry entries in my project. Any suggested work-arounds? It is important to note that we probably have around 50+ dlls/exes that we need to registered, both 32bit and 64bit versions. Registering these files results in thousands of registry entries, so some work-arounds won't be practical. Also, the registry entries need to be attached to the file's component. Some more thoughts:

• I think something needs to be re-worked, in regards to the [COM_PROP1] issue and registry collision. I don't think the [COM_PROP1] hack should ever be needed? If you have a 32bit file and a 64bit file with the same registry entries, but they are in separate features (and the features won't be included in the same build), the registry entries should never collide, and [COM_PROP1] should not be needed. If you have duplicate registry entries that would be included in the same build, then this probably shouldn't be allowed?
• For the registry view, maybe there could be a per-component view - you click on a component, and only the registry entries in that component will be displayed. If you want to look at all registry entries, instead of using [COM_PROP1], just show the the keys once, but show the duplicate values (this is how InstallShield seems to handle it).
• [COM_PROP1] should never show up in the built MSI.
• If you set synchronization to "Buildtime", only the registry entries of included features should be extracted? I'm assuming this is not being done, since "Buildtime" synchronization still results in the bug occurring.

I'm open to any viable workarounds for this, or a fix in the next version. I've been tinkering with a python script that imports registry files into a component (writing directly to the AI project file). I might be able to utilize this script to accomplish my goal. Overall, I'm having a tough time dealing with registry entries in AI (some more context here: http://www.advancedinstaller.com/forums ... =5&t=29871).

As always, thanks for the help!


Edit: Aside from the 32bit/64bit collision issue, it also looks like the registration extraction is not 100% reliable. I just noticed that on one of my dlls, none of the typelib or interface registry information was extracted. There are other tools that will extract registration information and generate a reg file. But, without the ability to import a registry file into a component, and no "REG file to merge at build" option, there is no way to add the registry content into your installation project.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Registry Bug

Hello,

Our testing team wasn't able to replicate this with their test DLLs. Can you please send us your DLLs over e-mail and the exact steps so we can investigate?
If you have a sample project using dummy resources which replicates the behavior it will also help.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codesynergy
Posts: 100
Joined: Fri Nov 14, 2014 10:29 pm

Re: Registry Bug

After some more investigation, I think there might be an issue with the com extraction tool. I have sent an email to support, which includes more detailed information and everything required to replicate the problem.


Thanks.

Return to “Common Problems”