GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

COM extraction from .ocx .exe does nothing or is incomplete

Update 2:

But... 11.8 COM extraction with AI running under XP (the original subject of this topic) still does nothing.
Last edited by GlenT on Wed Mar 11, 2015 4:34 pm, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: 11.7 COM extraction from .ocx .exe does nothing

Hello Glen,
I am concerned that the formatted references to the .exe and .ocx objects appear to be done differently on an object to object basis. In other words, two similar .ocx objects when subjected to COM extraction will produce different formatted path styles. In all, there are three different path styles produced by the extraction tool on our five objects. While they may all 'work' the result is disconcerting when trying to determine if the tool is working correctly.
I've added an improvement in our TODO list so we can use a consistent schema for all file paths added in "COM" page. We'll update this thread as soon as the improvement will be out. Thank you for your suggestion.
Are you confirming that the /Automation switch has now been moved to the path field for .exe objects?
Yes.
But... 11.8 COM extraction with AI running under XP (the original subject of this topic) still does nothing.
Indeed, the registry extraction still fails on Windows XP operating systems. I can confirm you this is still an Advanced Installer issue on which we are working. We'll try to add a fix in a future version of Advanced Installer and we'll let you know as soon as it will be out.

If you have any further questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

COM extraction from .ocx .exe does nothing or is incomplete

Update:

AI has confirmed that recent Windows updates (Win7 Pro) have damaged the COM extraction tool's ability to extract a complete set of COM information. Some information will be extracted from .exe and .ocx objects, but it may not be complete.

AI has opened a new ticket on this. In the meantime, AI recommends the following workaround:

"Until then, it is highly recommended to use our "Extract registration info from native library" option only on machines with a fresh installation of Windows."
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

Update:

Installed latest update (11.9) and tried a COM extraction on a test project. Not only did it not work, but it also somehow damaged the registry entries for the same installed .ocx objects on my test machine. Running the installer repair for our software restored the .ocx functionality.

I realize that my particular issue has not yet been resolved. I was curious to see what had changed with COM in 11.9. As long as I leave my existing projects alone, they seem to work. Looks like the latest changes in 11.9 made our issue slightly worse.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: COM extraction from .ocx .exe does nothing or is incompl

Hello Glen,

I'm afraid there was no improvement added in our last version (11.9) regarding your particular COM files. We still have in our bug tracking system a ticket to investigate the issues regarding your particular COM files. As soon as we'll include an improvement in AI we'll let you know.

Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

Wondering how the COM fix(es) are coming along.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: COM extraction from .ocx .exe does nothing or is incompl

Hello Glen,

Our development team investigated the issue about incomplete COM registration data extracted on machines having latest Windows updates installed, but unfortunately they cannot add any fix for this. It seems after applying latest Windows updates your COM files create/modify fewer registries on the systems when registered, therefore the API we use to extract the registration registries is catching fewer registration data. So, as long as the registration registry data of your COM files vary depending on the installed Windows updates, I'm afraid there is no improvement we can do. Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

There is nothing to understand. Either complete registry data is extracted from executable objects by AI, or it is not. Are you saying that AI will never correctly extract registry data from .exe and .ocx COM objects generated by Embarcadero C++ Builder? If so, this is a potentially significant issue for anyone who is a using RAD Studio and your products.

What is the workaround? I would suggest that (as a minimum) you need to add a tool that that could import/export formatted .reg files so that one could at least export a working set of registry and COM entries from one project and import them into another project.
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

Daniel wrote:It seems after applying latest Windows updates your COM files create/modify fewer registries on the systems when registered, therefore the API we use to extract the registration registries is catching fewer registration data. So, as long as the registration registry data of your COM files vary depending on the installed Windows updates, I'm afraid there is no improvement we can do.
Note that our registry data do not vary with the version of Windows or with Windows updates. It is the same on all versions of Windows. And it continues to work (unchanged) on all tested Windows platforms (XP, Win7, Win8x). As long as I don't attempt to perform an extraction, the existing AI projects work fine.

It is your API that has problems. Not only does it not extract entries for Interfaces, but as of 11.9 it also corrupted the registry of our installed software on the computer that is hosting AI. I'm not sure how that is possible, given that your API should not be writing anything when it is reading data from our .exe and .ocx objects.

Our issue is that if/when we need to make changes to our COM data, it becomes nearly impossible to update our AI projects. And hand creating COM and registry entries from scratch appears to be unsuccessful, due in part to the changes made recently to the structure of how COM info is stored in the AI projects. For example, AI insists on putting Interface registry entries under HKEY_LOCAL_MACHINE rather than under HKEY_CLASSES_ROOT when you edit an existing project. And that is not editable. Garbage gets left in the AI project file that has to be deleted by hand with a text editor.

The entire situation is untenable.
Last edited by GlenT on Wed Apr 22, 2015 4:24 pm, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: COM extraction from .ocx .exe does nothing or is incompl

Hello Glen,
There is nothing to understand. Either complete registry data is extracted from executable objects by AI, or it is not. Are you saying that AI will never correctly extract registry data from .exe and .ocx COM objects generated by Embarcadero C++ Builder? If so, this is a potentially significant issue for anyone who is a using RAD Studio and your products.
I'm saying only that you cannot use our "Extract registration info from native library" option against COM files whose registration data vary after installing Windows Updates. I'm not sure why your COM files register less registration data on systems with Windows Updates up to date, but in this case I'm afraid it is not reliable to use our "Extract registration info from native library" option. This is a limitation of our COM registration tool and of the way it is implemented. We apologize for the inconvenience. All we do is to call the registration function within your COM files, fetch the create registration registries of your COM and then import them in the .aip (setup project) file.
What is the workaround? I would suggest that (as a minimum) you need to add a tool that that could import/export formatted .reg files so that one could at least export a working set of registry and COM entries from one project and import them into another project.
Considering your particular COM files, I think the most straight-forward way to register your COMs would be to use a custom action. For example, you can call the regsvr32 tool within a custom action to register or unregister the COM files. You should use 3 custom actions for each of your COM file like this:
1. a custom action which will register the COM, scheduled on install after "Install Execution Stage -> Add Resources" action group as deferred
2. a custom action which will unregister the COM, scheduled on install (during rollback) added just before the above custom action
3. a custom action which will unregister the COM, scheduled on uninstall as deferred and added after "Install Execution Stage -> Remove Resources" action group

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

Daniel, our COM objects do not/can not self-register. So I do not understand what you mean when you say that they register different information under certain Windows updates. The information that your tool retrieves is incomplete and cannot be used. In addition, the AI interface attempts to put the Interface items in the wrong location in the registry.

As for writing our own registry routines, I suppose we should have done this 3 years ago, when it became apparent that AI did not support extraction of C++ Builder COM info. Assuming that we had had the expertise to do this. Unfortunately, it is extremely difficult to figure out exactly what to write where. For us, rolling our own COM registration tool would be a nighmare.

Unfortunately, AI promised (pre-purchase) that this would be fixed. And then weeks became months, which became years as we waited for the promised fix because AI management decided that it was not a priority (or was too hard). Then, it worked -- for a couple of months (and only under Win7). And now, it is broken again and AI management seem to have decided that they do not want to spend any more time on this. Hindsight is 20/20.

Please see my previous post for additional comments.
Last edited by GlenT on Wed Apr 22, 2015 11:17 pm, edited 2 times in total.
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

FYI, I just tested our current .exe and .ocx objects using our old InstallShield Express 2012 (under WinXP) to successfully extract COM info (at build time) and create an installer that runs successfully in Win7. Unfortunately, I cannot test a build under Win7 as our license does not permit me to move ISX to that platform.

Do we really have to keep a version of your competitors product around in perpetuity, using InstallShield Express to extract the COM data from our objects and then importing it into our AI projects so that we can reverse engineer this and fix it up in order to get it to work?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: COM extraction from .ocx .exe does nothing or is incompl

Hello Glen,

As all our users' feedback is important for us, I will try to answer for each one of your comments.
It is your API that has problems. Not only does it not extract entries for Interfaces, but as of 11.9 it also corrupted the registry of our installed software on the computer that is hosting AI. I'm not sure how that is possible, given that your API should not be writing anything when it is reading data from our .exe and .ocx objects.
I've talked with our development team about corrupting registration registry on the build machine (hosting the AI), and indeed they admitted this may happen, but only when using EXE COM types in your setup project which are already registered on the build machine. If an EXE COM is already registered on the build machine, when using our option to extract the registration registries this is what could happen:
1. our COM extraction tool register the EXE COM on current build machine; if the COM is already registered, then its registration registries will be overwritten
2. the extraction tool sniffs the created/modified registries by the registration operation
3. finally the extraction tool unregister the EXE COM from the build machine;

Considering this approach, when the EXE COM is already registered before using our registration option, there are two possible limitations:
1. the sniffed registration registries could be incomplete
2. the EXE COM could be unregistered from build machine

These are limitation of our registration option and to avoid them it is recommended to always use Advanced Installer on clean machines (which don't have the EXE COMs already registered or where you test the installation/registration of the COMs). We'll amend our user guide with this information in a future version of Advanced Installer.
Our issue is that if/when we need to make changes to our COM data, it becomes nearly impossible to update our AI projects. And hand creating COM and registry entries from scratch appears to be unsuccessful, due in part to the changes made recently to the structure of how COM info is stored in the AI projects. For example, AI insists on putting Interface registry entries under HKEY_LOCAL_MACHINE rather than under HKEY_CLASSES_ROOT when you edit an existing project. And that is not editable. Garbage gets left in the AI project file that has to be deleted by hand with a text editor.
To avoid our registration limitations you can disable it and, then manually create from scratch the COM registration registries in our "Registry" page.
Daniel, our COM objects do not/can not self-register. So I do not understand what you mean when you say that they register different information under certain Windows updates. The information that your tool retrieves is incomplete and cannot be used. In addition, the AI interface attempts to put the Interface items in the wrong location in the registry.
As explained above our COM registration tool only triggers the COM file registration on current build machine, sniffs the registry data created by the registration process and, then unregister the COM files from the current build machine. What I meant was, we don't know why, but it seems your COM registration data is different when registering on machines having Windows updates up to date. This is why we recommended to use our COM registration option only on machines with a fresh copy of Windows installed.
Unfortunately, AI promised (pre-purchase) that this would be fixed. And then weeks became months, which became years as we waited for the promised fix because AI management decided that it was not a priority (or was too hard). Then, it worked -- for a couple of months (and only under Win7). And now, it is broken again and AI management seem to have decided that they do not want to spend any more time on this. Hindsight is 20/20.
I can assure you this is not a management issue, but a strictly technical one. We will try to fine tune our current COM registration option, but we cannot guarantee the lack of issues on special COM objects like yours are. We will clear this up in our Help files.
FYI, I just tested our current .exe and .ocx objects using our old InstallShield Express 2012 (under WinXP) to successfully extract COM info (at build time) and create an installer that runs successfully in Win7. Unfortunately, I cannot test a build under Win7 as our license does not permit me to move ISX to that platform.

Do we really have to keep a version of your competitors product around in perpetuity, using InstallShield Express to extract the COM data from our objects and then importing it into our AI projects so that we can reverse engineer this and fix it up in order to get it to work?
The method we are using to gather the information from COM files is different than our competitors'. Our method indeed has some restraints, especially for some EXE files, as I previously explained. If you don't want to use the custom action approach I exposed in my previous post, then I'm afraid you should manually create the COM registration registries (sniffed with third party tools) in our "Registry"page.

Once again we apologize for this inconvenience. Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: COM extraction from .ocx .exe does nothing or is incompl

Daniel, thank you for your additional information. Here are my follow up comments:

The manual registration method that you mentioned, did not work for me. As mentioned previously, AI tries to put Interface entries under HKEY_LOCAL_MACHINE rather than under HKEY_CLASSES_ROOT. And this is not editable in the AI GUI (the option is greyed out).

The corruption did not start until v11.9 but I guess that was concurrent with whatever happened with Windows updates on Win7. We use the Build/Run command within AI when we are making changes. It is a convenient way to test installer changes, since our production environment and installer development happen on the same machine (and it is handly that Run also automatically uninstalls the previous installation). Since we custom compile distributables for each client, and have a continuous improvement programme (like AI) there are no canned releases from us. Distribution originates from the one machine.

You keep mentioning that our COM and EXE objects are registering different information under certain versions of Windows. Would this not also be an issue if we attempted to roll our own COM registration by using Regsvr32 run as a custom action? I cannot speak to the possibility that InstallShield Express may not work under Win7 when extracting COM info from our objects, but given the fact that it works under XP, while AI has NEVER performed a successful extraction under XP, makes me think that the limitation is in the API that AI is using, rather than being a symptom of some change in how our objects interact with some particular Win7 updates. Again, our product installs and runs as expected IF the installer has the complete set of registry entries. But it cannot work correctly if NONE of the Interface entries are extracted by the AI extraction tool.

How is AI planning on handling this from a GUI and support perspective? While our company may be in the minority in still using legacy COM (for industrial automation) one would expect that the claimed support for Embarcadero RAD Studio and the presence of COM extraction tools in the AI GUI would indicate to a new user that this should work. Will you be making changes to your GUI to either disable COM extraction if Embarcadero project templates are selected? Or will your extraction tool put out a warning message if it senses an object that may fail? Partial extraction of COM data by AI tools has wasted a lot of our time and would no doubt waste other users time too.

I don't know what method ISX uses to extract COM data, but I don't think that it does a trial installation. And is seems a lot faster, and obviously more reliable, than the AI method.

And as to my comments about AI priorities, here is a comment that I received from AI in June, 2013:

"My colleague from the development department mentioned he started working on the issue, however it will not be included in the next release or anytime very soon because there are other issues to address with higher priorities."

So, yes, I get it. Since there are not a lot of users asking for these fixes, it is not a priority for AI.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: COM extraction from .ocx .exe does nothing or is incompl

Hello Glen,
The manual registration method that you mentioned, did not work for me. As mentioned previously, AI tries to put Interface entries under HKEY_LOCAL_MACHINE rather than under HKEY_CLASSES_ROOT. And this is not editable in the AI GUI (the option is greyed out).
This may happen if you are trying to add a new type library (not interface) directly in our "COM" page. When adding from scratch a new type library in our "COM" page, it will be installed using the predefined Windows Installer "TypeLib" table which installs the type libraries into the HKEY_LOCAL_MACHINE registry location.

The manual registration I mentioned suppose you to manually create all the registration registries directly in the "Registry" page, and not in the "COM" page. However, this would be a tedious approach and could be error prone (i.e. any typo you could made can lead to a failing registration). The most recommended solution for your COM files would be to use custom actions like I explained in my previous post. This way the COMs should be properly registered with the Microsoft's regsvr32 tool.
You keep mentioning that our COM and EXE objects are registering different information under certain versions of Windows. Would this not also be an issue if we attempted to roll our own COM registration by using Regsvr32 run as a custom action?
No, this should not be an issue.
How is AI planning on handling this from a GUI and support perspective? While our company may be in the minority in still using legacy COM (for industrial automation) one would expect that the claimed support for Embarcadero RAD Studio and the presence of COM extraction tools in the AI GUI would indicate to a new user that this should work. Will you be making changes to your GUI to either disable COM extraction if Embarcadero project templates are selected? Or will your extraction tool put out a warning message if it senses an object that may fail? Partial extraction of COM data by AI tools has wasted a lot of our time and would no doubt waste other users time too.
I'm afraid we cannot test if the extracted registration info (caught by our COM extraction tool) is the proper one. This can be validated only by the COM's developer who authored the COM source files. As I said, all our "Extract registration info from native library" option does is to simulate the COM registration and sniff the registration data. To make sure the proper registration data was extracted you should test your installation package before releasing it. Also, this is a best practice which should be taken into account for all our features, not only for this specific ones.

If you have any doubts or further questions just let us know and we'll gladly try to assist you.

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

Return to “Common Problems”