I'm assuming that the COM object you built is an assembly that offers COM
interfaces. The deployment project doesn't know that your assembly is also a
COM server, and with VS.NET or 2003 there's no way to tell it (its
registration options are for DllRegisterServer COM servers, not .NET COM
servers) and you need to do what regasm would do. The base registry entries
can be seen by running regasm with the /regfile option, and import that .reg
file to the setup project, and you may need to generate a type library and
register that too.
I did an article here http://www.wd-mag.com/wdm/articles/2002/0209/
Download the code for that (Code Archive) and there's a Visual Studio setup
project that may help. The commercial setup tools (InstallShield Developer)
do all this stuff with a single check box, but VS setups just do basic
things.

Signature
Phil Wilson [MVP Windows Installer]
> Hey Phil,
>
[quoted text clipped - 14 lines]
>
> Barry
Barry Young - 06 Sep 2003 17:45 GMT
Phill,
Thanks for the help..
I click on the link, and the article doesn't contain a HREF link -- just
text. So how do I get to your article?
I'll try your suggestions and let you know how it goes..
Barry
Barry Young - 08 Sep 2003 15:07 GMT
Phil,
I have created the .reg file with regasm.exe. Do I just simply add the
file .reg to my setup project? I assume everytime I recompile the COM
Object source, I need to redo the .reg file? So this will always be a
seperate step??
Also what about the /codebase step? Do I need to do this as well?
What steps do I need to do to finish the installation so it works
properly on the target machine?
Thanks for all your help! I really appreciate it!
Barry
Barry Young - 08 Sep 2003 20:00 GMT
Hey Phil,
Well here is what I did:
(1) Created a Deployment.
(2) Installed it on the Target Machine.
(3) On the Target Machine, I did the following:
(A) regasm mydll.dll
(B) regasm /codebase mydll.dll
Now what I don't understand is why the Deployment project doesn't do the
registration of the DLL???
Anyway, I guess I am good for now..
Take care!
Barry
Phil Wilson - 08 Sep 2003 22:07 GMT
It's just not something that VS deployment projects do, it's by design. The
fully-featured tools do it (InstallShield, Wise etc).
To get this in your setup project, if you have run regasm with /codebase with
the regfile option, you can import that .reg file into VS setups by
right-clicking on the "Registry on Target Machine" text. The important thing to
fix is that the InprocServer32 key should point to [SystemFolder]mscoree.dll
(complete with those brackets and case).
If you have a type library that needs registering, add the .tlb to your setup
and it will automatically set the Register property to vsdrfCOM and register all
the interfaces.

Signature
Phil Wilson [MVP Windows Installer]
----
> Hey Phil,
>
[quoted text clipped - 14 lines]
>
> Barry
Barry Young - 08 Sep 2003 22:32 GMT
Hey Phil,
I am totally following you now.. Thanks!
I imported the .reg and it created all the registry entries for the
target machine... AWESOME...
But I am not quite sure about this next part...
The important thing to fix is that the InprocServer32 key should point
to [SystemFolder]mscoree.dll (complete with those brackets and case).
Is this a manual step on the target machine or is this done via the
setup project?
Sorry for the ignorance...
Thanks again for your help...
Barry
Phil Wilson - 10 Sep 2003 18:31 GMT
Do that in the setup project. [SystemFolder] is a Windows Installer property
that will be resolved at install time to the actual folder path.

Signature
Phil Wilson [MVP Windows Installer]
----
>
> Hey Phil,
[quoted text clipped - 17 lines]
>
> Barry
Phil Wilson - 17 Sep 2003 23:08 GMT
Duh, I'm being dumb here - for the class library you can set the Register
property to vsdraCOM and it will create the registration entries we've been
talking about. Sorry to drag you down the long path.

Signature
Phil Wilson [MVP Windows Installer]
----
>
> Hey Phil,
[quoted text clipped - 17 lines]
>
> Barry
Barry Young - 08 Sep 2003 22:48 GMT
Hey Phill,
Is there a way for the install to automatically detect and re-register
the DLL on the target machine if it exists already?
Similiar to when you Build the COM Object with VS.NET on the development
machine, it unregisters and registers the new version.
Or I assume I will have to uninstall and re-install??
Probably the safest route??
Thanks again!
Barry
Phil Wilson - 10 Sep 2003 18:37 GMT
Nothing automatic in that area. The best thing to do in your .NET class is to
nail down the Guids for the class (and the interface if you used one) so that
the Guids don't change - use GuidAttribute. Also nail down the version with
AssemblyVersion (don't use the *) otherwise that changing version will cause
your assembly to be not found. Interfaces work well too. Once mscoree.dll gets
the COM client's request, it looks for the assembly in the normal way, requiring
version, strong name etc to match.

Signature
Phil Wilson [MVP Windows Installer]
----
>
> Hey Phill,
[quoted text clipped - 12 lines]
>
> Barry