locked
Uninstall COM AddIn dll from registry completely if it has installed from multiple location within same machine from RegASM.exe tool RRS feed

  • Question

  • Type: critical issue

     

    Environment:

    OS : - Windows 7 64 bit

    IDE : - Visual Studio 2013

    Compiled: - .Net Framework 4.6

    Language : - VB .net

    Project type : - Shared Add-in

    Project Build: - Class Library (Dll file)

     

    Problem Description: We have developed Add Ins program for (Word, Excel, Outlook and Power Point) which register Dll by RegAsm.exe tool by .Net Framework 4.6. For register/un-register Dll, we use following commands, and it creates a button on all the applications.  

    Register command: <Drive>:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /codebase "MSAddIns.dll"

    Un-register command: <Drive>:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /unregister” "MSAddIns.dll"

    .

    In Development environment, we are facing problem in uninstalling Dll, because it has registered from multiple location, so we need to know, how to remove all registry entries at once, so that environment can be clean.


    .

    Kindly assist us.

    I will be really thankful.

    Register command: <Drive>:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /codebase "MSAddIns.dll"

    Regards, S.P Singh


    • Edited by S.P Singh Wednesday, June 26, 2019 6:46 AM
    Wednesday, June 26, 2019 6:45 AM

Answers

  • VSTO doesn't provide anything for that.

    You may check the output after registering assemblies in the windows registry on your own. Just try to check windows registry records. 


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    • Marked as answer by S.P Singh Saturday, August 10, 2019 5:57 PM
    Wednesday, June 26, 2019 8:58 AM

All replies

  • Hello Singh,

    Why do you need to register the assembly from multiple locations?

    When you register an assembly for use by COM, Regasm.exe adds entries to the registry on the local computer. More specifically, it creates version-dependent registry keys that allow multiple versions of the same assembly to run side by side on a computer. The first time an assembly is registered, one top-level key is created for the assembly and a unique subkey is created for the specific version. Each time you register a new version of the assembly, Regasm.exe creates a subkey for the new version.

    For example, consider a scenario where you register the managed component, myComp.dll, version 1.0.0.0 for use by COM. Later, you register myComp.dll, version 2.0.0.0. You determine that all COM client applications on the computer are using myComp.dll version 2.0.0.0 and you decide to unregister myComponent.dll version 1.0.0.0. This registry scheme allows you to unregister myComp.dll version 1.0.0.0 because only the version 1.0.0.0 subkey is removed.

    If you register the same assembly version only the path to the assembly is updated in the windows registry. Correct me if I am wrong.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, June 26, 2019 7:09 AM
  • Yes, somehow same Dll has register from multiple location with different version or might be with same version. In such condition, what will happen. Kindly elaborate, so that I can have more clarity on this.

    Kindly assist us.

    I will be really thankful.

     

    Regards, S.P Singh

    Wednesday, June 26, 2019 7:39 AM
  • VSTO doesn't provide anything for that.

    You may check the output after registering assemblies in the windows registry on your own. Just try to check windows registry records. 


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    • Marked as answer by S.P Singh Saturday, August 10, 2019 5:57 PM
    Wednesday, June 26, 2019 8:58 AM