cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

Question about .NET COM

I am sort of new to .NET COM registrations. I have inherited a wise studio project and am in the process of converting it to InstallShield 2012.

The application is a .NET app with some VB objects.
The previous developer had constructed the installer so that several of the COM objects would register after they were installed via a batch file using

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\regasm

A set of commands would look like this:
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\regasm AmazingCharts.MainBusinessObjects.dll /unregister >> %FILENAME%
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\regasm AmazingCharts.MainBusinessObjects.dll /tlb: AmazingCharts.MainBusinessObjects.tlb /verbose


I am thinking that there has to be a better way of managing registering these files than through a batch file after install.

This is a basic MSI installer and I would rather use the MSI to manage the registration since it can remove the registration after too.

BTW, there is a batch file to manage the removal of the registration of the files as well.

Thank you for any information you can pass along my way.
Labels (1)
0 Kudos
(1) Reply
Christopher_Pai
Level 16

Just make the assemblies (DLLs) key files of their own components and set .NET COM Interop = yes on them.

During the build, InstallShield will call Regasm /regfile and harvest the results into your registry table.

This generally works although there are some exceptions. (See my earlier post from today ).

Say goodbye to another custom action. 🙂 Life is good.
0 Kudos