View Full Version : Non Self Registering DLL - How To?

02-26-2013, 10:06 PM
Hi All,

I'm sure this question has come up quite a bit over the forums so I apologize that I could NOT find the exact information that I was looking for. With InstallShield having so many different versions, and the versions having different layouts I could not find a guide or information that I could follow.

My problem I think is very simple. I have a DLL file that I've created with VS2010 and it's a COM object that I want others to be able to instantiate. Therefore I know I need to register this DLL file properly. Before creating an installer, I've been using Regasm /codebase to do the registration for me.

Now that I'm about to release the object I'm creating an installer and I wanted InstallShield 2012 Spring Express to register the COM object for me so I didn't have to request the users to do such a task.

I've tried going to "Files" and right clicking my "ProjectName.Primary output" file and going to its "COM & .Net Settings" properties tab and marking it as Registration Type "COM Extraction". However this produces warnings that my dll is not self registering.

So I guess I have two questions here:

1. What does it mean my dll is not self registering? Regasm can register it just fine using the command above. I believe the answer is that I am not exporting the DllRegister and DllUnregister functions, but I don't fully know how to incorporate that into my C# code. Given Regasm can register it WITHOUT this, I feel like InstallShield probably can too.

2. Assuming my DLL is not self registering, and I do not make it self registering, how can I get InstallShield Spring Express to register this for me?

If there is a simple guide out there to make my dll file self registering and that is 10 times easier I am more than happy to do that (as all of my future COM objects I create will benefit from that). However the guide's I've found on making dll/exe self registering either include executing (which my dll obviously is not an executable) or actually using Process object and calling regasm itself (which again, my dll is not an executable). So those guides were actually more confusing than helpful in my situation.

Thanks for any help in advance.