zappbrannigan
Posts: 17
Joined: Tue Jan 21, 2020 5:15 pm

dll Registration options missing

Hi there,

1. I have the below cmd scripts that register my code files proplerly however I can't see how to add the /clb /codebase parameters to the file and folder properties register window. using latest AI version.
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\Regasm XL1.dll /tlb /codebase

2. I also have a windows service I need to register is this done totally in the service node or do I need do do something to the file properties to register (which of the 3 options on the reg form all fail to extract).
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\InstallUtil BatchService.exe

3. I also have an old com registration app that needs the below command line manually. I don't see how or where to add this in AI
PagesImgConvert.exe /regserver
(which of the 3 options on the reg form all fail to extract).

Thanks!
Zapp
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: dll Registration options missing

Hello Zapp,

1. Unfortunately, we don't have support to extract a TLB from COM assembly. In order to achieve what you want you should manually extract (outside of Advanced Installer) the TLB file from your COM assembly and, then add it in "Files and Folders" page into desired directory and enable its "Register .NET assembly for COM interoperability" registration option.

2. This can pretty much all be done from the "Services" page. However, please keep in mind that services that rely on the presence of an assembly in the Global Assembly Cache (GAC) cannot be started during the execution of StartServices standard action. If you need to start a service that depends on an assembly in the GAC, you must use a custom action scheduled after the InstallFinalize standard action.

Basically, here we will need to first remove the "Start" service control operation and then start the service through a custom action, scheduled after "Add Resources" action group with its execution time set to "When the system is being modified (deferred)". For instance, a .BAT file with the following code could be used:

Code: Select all

net start "Service Name"
3. In what regards this, this can be achieved through a custom approach as well. Please have a look on the following thread in which my colleague explains how this can be achieved:

COM extraction

(simply ignore the regsvr32 part of the thread)

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zappbrannigan
Posts: 17
Joined: Tue Jan 21, 2020 5:15 pm

Re: dll Registration options missing

To make registration and unregistration easier and to be able to use the
/tlb /codebase
flags my app requires using the 64bit .NET framework registration commands eg.
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\Regasm XL1.dll /tlb /codebase

I decided to do a custom action that calls the .bat file (one to register and one to unregister).

  • I have it set to run as admin
  • No command line specified
  • no working directory specified
  • All Execution Options are unchecked as well
  • The Reg occurs after Add Resources (so the files exist before trying to register) - execution time delayed
  • The unreg occurs After Preparation (so no files are removed before unregisteration) - execution time immediately
We ended up being able to remove the old /regsrvr com.
I don't have InstallFinalize Install Sequence stage maybe 16.7 is a little different.
It seems to work for the most part, if any of the above is bad practice let me know.

Thanks for your pointers!

Zapp
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: dll Registration options missing

Hello Zapp,

Thank you for your followup on this and for sharing your solution with us.

From what I can see, the solution should work as intended.
I don't have InstallFinalize Install Sequence stage maybe 16.7 is a little different.
In what regards this, in order to show a standard action that is not displayed by default, you can go to "Custom Actions" page --> right click on any action group (i.e. "Preparing", "Add Resources", etc.).

For instance, in order to show the "InstallFinalize" standard action, please proceed as it follows:

- in "Custom Actions" page, right click on the ""Preparing" action group (under "Install Execution Stage")

- "Show Standard Action" --> "Finish Execution" --> select "InstallFinalize"

This way, the standard action should be displayed in the list.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”