Re: Self registering a COM dll in a VS2003 Windows setup project...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Phil Wilson (pdjwilson_at_nospam.cox.net)
Date: 12/19/04


Date: Sun, 19 Dec 2004 11:23:59 -0800

When deployment projects put an 'a' in the COM registration, that's a clue
that it thinks it's registering an assembly, and that's not something you do
with regsvr32. You might have both a regular COM DLL requiring regsvr32-type
registration and an Interop DLL too, especially if you added a reference to
the Redemption DLL in Visual Studio.

-- 
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
"Rodzilla" <rodzilla@softwareonsailboats.com> wrote in message 
news:uc5xd.57118$yf.26596@fe2.texas.rr.com...
> Phil - thanks for your reply! I saw one of your other posts and it was 
> also extremely helpful in un-wrapping this conundrum...
>
> I was able to make some progress. In Visual Studio 2003 my Visual Studio 
> solution is a Windows forms application. Within the solution there are two 
> projects - a program project and a setup project. The Program project has 
> the customized Redemption dll included as a reference. This allows me to 
> develop and test the program itself. Of course my Setup project 
> automatically detects any dependencies and includes the dependent files - 
> including the Redemption dll.
>
> I now exclude the "automatically included" reference to the Redemption dll 
> in the setup project - this is the version that doesn't get self 
> registered. In fact this reference does not even show a "self registering" 
> option for the Register property - only vsdraCOMRelativePath and vsdraCOM, 
> neither of which cause the dll to get registered.
> So now I include the Redemption dll as an assembly in the setup project, 
> and set the assembly property to "SelfRegister". By including the 
> Redemption dll in this fashion ( ie including it by specifically adding 
> the assembly instead of the automatically detected dependency route), you 
> are able to insure that is self registers. Woo-woo!
>
> My remaining problem is that when I un-install, the register still has a 
> setting for the now-missing Redemption dll....
>
> "Phil Wilson" <pdjwilson@nospam.cox.net> wrote in message 
> news:elNYJRU5EHA.1264@TK2MSFTNGP12.phx.gbl...
>> Most of the Register settings extract the settings at build time and put 
>> the registration data directly in the MSI file so that the DLL doesn't 
>> register at install time (the registry data gets written from the MSI 
>> file). This is the preferred way for a number of reasons. It sounds like 
>> the registration code in that DLL is doing something that isn't being put 
>> into the MSI file. The vsdrfCOMSelfReg choice is the one you should try - 
>> it does the same thing as regsvr32 does, calling DllRegisterServer at 
>> install time.
>> -- 
>> Phil Wilson
>> [Microsoft MVP-Windows Installer]
>> Definitive Guide to Windows Installer
>> http://apress.com/book/bookDisplay.html?bID=280
>>
>> "Rodzilla" <rodzilla@softwareonsailboats.com> wrote in message 
>> news:pyJwd.53661$2e.37180@fe2.texas.rr.com...
>>> Hi all...If anyone has had experience creating a Windows Setup project 
>>> that
>>> includes a customized Redemption dll, we could sure benefit from your
>>> experience. These questions are very Redemption specific...(
>>> http://www.dimastr.com/redemption/ )
>>>
>>>
>>>
>>> We are creating a Windows forms application in Visual Studio/Visual
>>> Basic/2003 and using an excellent 3rd party COM dll called Redemption to 
>>> access Outlook.
>>> ...( http://www.dimastr.com/redemption/ )
>>>
>>> We have used Redemption's utility and followed their
>>> instructions to create a customized version of the Redemption COM dll. 
>>> The
>>> problem is getting the customized Redemption COM dll to self register on 
>>> any
>>> target machines when installed via a Windows Setup/msi process..
>>>
>>> So far, the only way I can get the customized dll to work on ANY machine 
>>> is
>>> to open a command window and use regsvr32.exe to register the customized 
>>> dll
>>> on that machine. I have not been able to make a customized Redemption 
>>> dll self register
>>> when installed through the .msi installation process, and our users will 
>>> not
>>> want to or be able to manually register a dll.... We have tried changing 
>>> the
>>> dll's Register properties in the Setup project (vsdraCOMRelativePath,
>>> vsdraCOM) to no avail...
>>>
>>> So my questions are:
>>>
>>> 1)       After I have created a customized Redemption dll, how should 
>>> the
>>> customized dll get properly registered on my development machine? (So 
>>> far I
>>> have used regsvr32.exe to manually register the dll on my development
>>> system. Is this the proper process? Is there another way? So far, if I 
>>> don't
>>> register the custom Redemption dll using regsvr32, the program fails.)
>>>
>>> 2)       When using Visual Studio 2003/Visual Basic and a Windows forms
>>> application, what steps & settings are necessary in a Windows Setup 
>>> project
>>> to insure that the customized Redemption dll will be self registered on 
>>> the
>>> target system when my program is installed?
>>>
>>> Thanks in advance for any help you might have...
>>>
>>> Rod Kimmel
>>>
>>>
>>>
>>
>>
>
> 


Relevant Pages

  • Re: Self registering a COM dll in a VS2003 Windows setup project...
    ... projects - a program project and a setup project. ... the customized Redemption dll included as a reference. ... My remaining problem is that when I un-install, the register still has a ...
    (microsoft.public.dotnet.framework.setup)
  • RE: Registering a custom DLL after deployment - advice?
    ... Register property to vsdraCOM - and leave the output as content ... I added the dll and the tlb and set the build action to ... publishing and invoke the .bat file. ... The custom dll is for the Access ADP. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Self registering a COM dll in a VS2003 Windows setup project...
    ... Most of the Register settings extract the settings at build time and put the ... at install time. ... code in that DLL is doing something that isn't being put into the MSI file. ... I have not been able to make a customized Redemption dll ...
    (microsoft.public.dotnet.framework.setup)
  • Re: IMailRuleClient wont work!!!
    ... Does your DLL properly export DllRegisterServer and DllGetClassObject? ... > So i have tested manually register the COM. ...
    (microsoft.public.pocketpc.developer)
  • RE: COM Addin dll and HKEY_LOCAL_MACHINE
    ... registry for HKEY_LOCAL_MACHINE (HKLM). ... associate the designer objects with HKLM and compile the DLL so that it would ... Outlook ] ... > designer to register in HKEY_CURRENT_USER. ...
    (microsoft.public.vb.com)