Attn Tick: SW Addin Registry cleaning

Discussion in 'SolidWorks' started by CS, Oct 7, 2005.

  1. CS

    CS Guest

    Tick,

    I am just getting into addins and I remembered that you have a registry
    cleaner for addins. I was wondering if you would like to pass it
    along. Or perhaps you can inform me on what I am screwing up. I am
    using VS.Net and SW 2005 and when I create an addin and test it it
    works great the first time. But I think I have been doing it wrong.
    It seems if I play it in debug mode it starts SW and the addin but the
    first try I installed the dlls into SW and I think that screwed things
    up. Anyway it doesn't load properly now and I don't know exactly how
    to fix it without screwing around blindly.

    Corey Scheich
     
    CS, Oct 7, 2005
    #1
  2. CS

    That70sTick Guest

    <http://www.esoxrepublic.com/devtools/>

    Disclaimer:
    This code was written for SW2003. It may not be current w.r.t. later
    SW registry structure. Also, this code was written before I discovered
    how to "properly" unregister a DLL using "regsvr32" (reference: Google
    keywords: "regsvr32 unregister DLL").

    This code still has some merit, as regsvr32 does not clean out
    SW-specific registry entries.

    Always remember to back up your registry before you tinker with it!
     
    That70sTick, Oct 7, 2005
    #2
  3. For me the easiest way is to use Inno Setup that registers/unregisters
    dll's and just use it's functions to remove other stuff that you might
    write into the registry inside your code, if necessery. In VB6 there's
    an option to keep project compatible when you compile it:
    Project-Properties-Component-Project Compatibility. With that you can
    just replace the old dll with the new one when ever you make changes.
    Otherwise you have to unregister dll every time you make a change
    because the ID changes.

    --

    regards

    Markku Lehtola

    www.markkulehtola.net
     
    Markku Lehtola, Oct 7, 2005
    #3
  4. CS

    CS Guest

    Tick,

    The regsvr thing worked except for .NET you have to use RegAsm.exe
    instead the command line looks like this

    regasm /unregister "Path\mydll.dll"

    I am going to compile your exe also but I have to wait a bit because I
    have only VS.Net on my computer one of the other guys here has VB6 so
    he is going to compile it for me. Do you know if it will act up if
    there is more than one version of SW installed. I have 2005 and 2006
    installed. I don't think it should because I think the only reference
    to them is generic to all installations. Any way thanks I will post
    back once I get everything going.
     
    CS, Oct 7, 2005
    #4
  5. CS

    That70sTick Guest

    I've never tried this on a machine with more than one version of SW
    installed. Best to comb through the code and see where it is looking
    for registry entries. I really can't remember. It's been a while.

    The program only looks for certain registry entries. It doesn't open
    or interact with SW. Also, you can review and deselect certain entries
    before deletion.
     
    That70sTick, Oct 7, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.