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

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

I had some time to play around with the existing AI .reg import function. Having some trouble understanding how to format data types in the .reg file to get correct in AI.

For example, a Class file key that looks like this in the AI GUI after it was EXTRACTED by AI:

Code: Select all

[#CSPlus.exe] /Automation
comes into AI from .reg looking like this:

Code: Select all

[\[]#CSPlus.exe[\]] /Automation
Are these the same thing to AI?

It wouldn't be so bad if one could edit these later in the AI GUI, but you can't.

Similarly, after extraction by AI, the GUI shows:

Code: Select all

APPDIR\BIN\CSPlus.exe
rather than:

Code: Select all

[\[]APPDIR[\]]\BIN\CSPlus.exe


or

Code: Select all

[APPDIR]\BIN\CSPlus.exe
This is like trying to pick up a jellyfish with a stick...
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,

If you edit your .REG files, which you want to import in AI, to contain formatted references as you exemplified, then please keep in mind this is not the correct approach. This is because the special characters ("[") from formatted strings will be escaped ("[\[]"), so at install time they will be written as they are instead of being resolved to their installation paths. So, you should edit the related registry values in Advanced Installer (in "Registry" page) only after the REG file is imported.

Reviewing our conversation I think I misunderstood your second question from here and I've edited my response.

Let us know if this helped, otherwise please give us more details about the workflow you are using (maybe iterate a step by step flow of actions you are doing).

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, therein lies the problem. Not all of the COM information is reported on the AI Registry page. I see information for the .ocx objects, but not for the .exe objects. For example, it is impossible to edit the COM Class File string [#CSPlus.exe] /Automation because it does not appear under the Registry entries page. It is impossible to add the /Automation option via editing (since you moved that option from the dedicated field that used to exist a few versions back).

When we first started with AI three years ago, the only method that we had to get going was to import the InstallShield Express .msi files into AI. And they brought the COM registry stuff with them. Currently this is what we are distributing. All of the relevant COM info appears on the COM page in AI, but NOTHING appears on the AI registry page in those AI projects.

Now, I am working on the next release. What I have is a set of installers that I succeeded (mostly) in getting COM info extracted via AI (while that was still working). In those projects, not all of the info appears on the AI registry page (as noted above).

Now, I have experimented with importing .reg files and have similar issues. From what I can see, exactly the same info appears in the registry page of AI, as it did when I used AI to extract the COM data. In other words, the registry data, as shown in the AI GUI, is not complete.

At this point, the only way I could change some of this info is to try and edit the AI project file with a text editor. After three years, I still don't know exactly what a complete set of our COM and registry entries is supposed to look like in AI. Just when I think I understand it, I find out that something else is not quite right. Basically, I have relied on testing our installed app to see if the all the expected functionality is there. But I still have no clear idea how it gets there.

I should point out that I was used to this in ISX, as there was no way to view the COM info in the Express version of that tool either.
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,
Daniel, therein lies the problem. Not all of the COM information is reported on the AI Registry page. I see information for the .ocx objects, but not for the .exe objects. For example, it is impossible to edit the COM Class File string [#CSPlus.exe] /Automation because it does not appear under the Registry entries page. It is impossible to add the /Automation option via editing (since you moved that option from the dedicated field that used to exist a few versions back).
Indeed, in this case this seems to be a limitation of our "COM" page. The related "Class -> File" field is currently non-editable. You can only use [...] button picker to choose a file to point to, but you cannot edit/append a command line to it. I've talked with our development team and they confirmed that an improvement will be made regarding this scenario in one of the next two versions of Advanced Installer. We'll update this thread as soon as the improvement will be implemented.

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

Thank you. This also concerns a previous post, in which I was asking about the correct string format for these. When extract via AI, the string appears like this:

Code: Select all

[#CSPlus.exe] /Automation
But when I browse in AI to the installed .exe file and insert it, it appears in AI like this:

Code: Select all

APPDIR\CSPlus.exe 
I see also references in the Help to this format for "full short path of the file when used in a registry value":

Code: Select all

[!CSPlus.exe]
Are these all interchangeable in AI?

On the registry page in AI, I see CLSID references generated by AI (after importing from .reg) that look like this:

Code: Select all

"[\{]5B7F95CF-90E6-460D-B01C-74D90C9EAEC9[\}]"
Is this correctly formatted by AI? Do I understand correctly, that this type of syntax ' [\{] ' is only used on the AI registry page, but not on the AI COM page?

I guess that it goes without saying, that a working AI extraction tool would make understanding these syntax issues unnecessary. :idea:
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,
Thank you. This also concerns a previous post, in which I was asking about the correct string format for these. When extract via AI, the string appears like this:

Code: Select all

[#CSPlus.exe] /Automation
But when I browse in AI to the installed .exe file and insert it, it appears in AI like this:

Code: Select all

APPDIR\CSPlus.exe 
I see also references in the Help to this format for "full short path of the file when used in a registry value":

Code: Select all

[!CSPlus.exe]
Are these all interchangeable in AI?
Yes, all the above references are expanded during installation to paths pointing to the same file.
On the registry page in AI, I see CLSID references generated by AI (after importing from .reg) that look like this:

Code: Select all

"[\{]5B7F95CF-90E6-460D-B01C-74D90C9EAEC9[\}]"
Is this correctly formatted by AI? Do I understand correctly, that this type of syntax ' [\{] ' is only used on the AI registry page, but not on the AI COM page?
Can you please send us the .aip (project file) and the REG file you are trying to import to support at advancedinstaller dot com so we can have a look over them?

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

Yes, all the above references are expanded during installation to paths pointing to the same file.
I'm still struggling with understanding this. If all of the above references do the same thing, then why are there three different forms of the same thing? It is very confusing when you get one syntax from one method and another syntax from another method within the AI GUI and then find a third syntax in the documentation.
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 apologize for my delayed reply but in the last part of the previous week I was out of the office.
On the registry page in AI, I see CLSID references generated by AI (after importing from .reg) that look like this:

CODE: SELECT ALL
"[\{]5B7F95CF-90E6-460D-B01C-74D90C9EAEC9[\}]"


Is this correctly formatted by AI? Do I understand correctly, that this type of syntax ' [\{] ' is only used on the AI registry page, but not on the AI COM page?
Yes, this is the default way we handle the imported CLSID guids. In "Registry" page we write them escaped (e.g. "[\{]") because the "Value" field of a registry is of formatted type and "{" and "}" characters are special formatted characters. So, after the registry import operation we escape them to make sure the curly brace characters will be written in registry as they are. However, in "COM" page the fields in which the GUIDS are set are not of formatted type and we display them as they are. However, during the installation they will be written in the registry (as it should) as they are (e.g. "{5B7F95CF-90E6-460D-B01C-74D90C9EAEC9}").
I'm still struggling with understanding this. If all of the above references do the same thing, then why are there three different forms of the same thing? It is very confusing when you get one syntax from one method and another syntax from another method within the AI GUI and then find a third syntax in the documentation.
In "COM" page only the "APPDIR\CSPlus.exe" and "[#CSPlus.exe]" reference types are used. The "APPDIR\CSPlus.exe" form is the desired one to be used because it also contains the directory (i.e. "APPDIR") where the COM file resides. In this way it will be easier to locate it in "Files and Folders" page. However, due to an Advanced Installer limitation, when the file reference also contains an appended command line (e.g. "/Automation") then the only way we can write it is as a direct reference to the file (i.e. "[#CSPlus.exe] /Automation"). This is an AI limitation and it should be fixed as soon as we will made the "Class -> File" field editable again. So, when this fix will be added the only way a file will be referenced in "COM" page will be as "APPDIR\CSPlus.exe". We'll update this thread when this improvement will be done.

All the best,
Daniel

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

So, if I am understanding this correctly, "APPDIR\CSPlus.exe /Automation" is not an allowed syntax in AI? Or, it will be allowed when the field is made editable again?

And when is [!CSPlus.exe] used?

I remain puzzled why the separate command line field was removed from the COM page.
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,
So, if I am understanding this correctly, "APPDIR\CSPlus.exe /Automation" is not an allowed syntax in AI? Or, it will be allowed when the field is made editable again?
Yes, currently this is not allowed in our "COM" page. When the related field will be editable again the above reference type it should be possible. We'll update this thread when the improvement will be made and also will come with more details then.
And when is [!CSPlus.exe] used?
This reference type it can be used only in "Registry" and "Files and Folders" page in a registry value, an INI file or in a shortcut to an URL. When used, the reference will be resolved at install time to the short path of the file.
I remain puzzled why the separate command line field was removed from the COM page.
This was a decision of our development team to prevent users from editing the extracted command line of our COM registration option. They have reanalyzed the possible scenarios (i.e. your case when the COM registries are imported) and an improvement will be available in a future version.

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

This was a decision of our development team to prevent users from editing the extracted command line of our COM registration option. They have reanalyzed the possible scenarios (i.e. your case when the COM registries are imported) and an improvement will be available in a future version.
Given that the AI extraction method is no longer reliable, they may wish to consider putting the AI COM GUI back the way it was.
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

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

FYI, I installed and tested AI 12.1 under Windows XP. This update claims to have fixed COM extraction under WinXP. Ran the COM extraction tool and got mixed results. The entries on the COM page in AI appear to be complete for .OCX objects, but most of the entries for the .exe objects (under COM, Interface and Type Library categories) are missing.

Note that this is a different list of omissions when compared to what the AI does under Win7, which omits all of the Interface entries, but succeeds in getting entries for COM and Type Library info for .exe objects. So, it is still broken under XP, but broken in a different way than it is under Win7.
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,

Thank you for your continuous feedback.

Indeed, I can confirm you that our development team has just discovered a few new EXE com extraction issues. They are currently under investigation and new fixes/improvements will be added in a future version of Advanced Installer.

In the meantime, for an as accurate as possible extraction results please make sure that your EXE com is not already registered on your build machine. As a workaround, you can unregister it, open your setup project in "Advanced Installer", enable the "Extract registration info from native library" option for your EXE com in "Files and Folders" page, save the project and, then register again (if needed) the EXE com on your machine.

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, I tested AI 12.1 running under WinXP and Win7 using the method that you recommended (above) by previously uninstalling the application prior to running AI extraction. The results:

WinXP - no change - registry entries and COM entries still missing for .exe objects
Win7 - seems to be working again (despite your previous observations that our objects were self-registering different info under Win7 with certain Windows updates -- not sure where we are at with this, but I'm using the same test objects in all cases)

Interesting note, persuant to our previous conversations about my syntax confusion, AI 12.1 under Win7 is now writing the following syntax to the COM page for .exe objects:

Code: Select all

[!CSPlus.exe] /Automation
rather than using [#CSPlus.exe] or APPDIR\CSPlus.exe

In fact, it is now using it for .ocx objects as well:

Code: Select all

[!DisplayTextControl.ocx]
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,
Daniel, I tested AI 12.1 running under WinXP and Win7 using the method that you recommended (above) by previously uninstalling the application prior to running AI extraction. The results:

WinXP - no change - registry entries and COM entries still missing for .exe objects
Win7 - seems to be working again (despite your previous observations that our objects were self-registering different info under Win7 with certain Windows updates -- not sure where we are at with this, but I'm using the same test objects in all cases)
Our development team has added several fixes regarding the last discovered EXE COM extraction issues. I've sent you, by email, a download link to a RC version of AI 12.1 which contains the above fixes. Can you please test the scenario again using this RC version of AI 12.1 (the sent RC is basically the AI 12.1 official release + the fixes which the dev team merged after the previous release)?
Interesting note, persuant to our previous conversations about my syntax confusion, AI 12.1 under Win7 is now writing the following syntax to the COM page for .exe objects:

CODE: SELECT ALL
[!CSPlus.exe] /Automation


rather than using [#CSPlus.exe] or APPDIR\CSPlus.exe

In fact, it is now using it for .ocx objects as well:

CODE: SELECT ALL
[!DisplayTextControl.ocx]
I've talked with the dev team about the short paths references (i.e. [!DisplayTextControl.ocx]) appearance in our "COM" page and they admitted this kind of references could actually be displayed on our "COM" page too. I apologize for my previous misleading reply regarding the references syntax. The dev team added an improvement on their road map so that in a future version of Advanced Installer only references of type "APPDIR\CSPlus.exe" be used, for a better UX and consistency.

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

Return to “Common Problems”