Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations The Obturator on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right way to remove old dlls?

Status
Not open for further replies.

Valshnar

Mechanical
May 12, 2003
13
Alright you SW API experts here's one I have not seen anywhere in the posts.

I'm developing a company toolbar, and am almost done. One problem: each time I develop a new .dll it keeps the old reference in the Add-in. So my add-in appears 10x in the SW add-in list. Not really a problem on my computer, though I appear to have toasted my SW installation by a wrong registry hack. But what happens when I go to deploy this dll company wide and then want to upgrade it?

What's the proper way to remove an existing add-in and then replace it with a new add-in? Speak slowly and use monosyllabic words, I'm a VB newbie of just two weeks!

Thanks!

Rob
 
Replies continue below

Recommended for you

Hmmm...

First off, you probably don't need to do this. Just unregister your old version, recompile your new one, replace the DLL, and reregister.
<<
Are you in VB? Make sure you have the Project compatibility set under the project properties so you are not creating a new GUID every time you compile.

I have a registry cleanup tool for addins. I wrote it before I discovered regsvr32, so it's slow. But, it cleans up the addin registry info.
<
[bat]I could be the world's greatest underachiever, if I could just learn to apply myself.[bat]
-SolidWorks API VB programming help
 
Thanks, The Tick

Unregistering with regsvr32 does indeed unregister it but it leaves the add-in listed in the add-in list. If you are developing, soon you have a bunch of add-ins with the same name.

What does seem to work nicely is a batch command that calls the unregister dll tool that I found on the Solidworks API site. (Batch command just saves a bit of typing). The tool is unregswdll.exe

I think it is necessary to execute the batch command before you remove the old dll and replace it with a new one. Anyway, seems to all work now, if you remember the order.

Thanks again

Rob

 
Well, that's also what my uninstall tool accomplishes, but more slowly because it iscombing individual registry entries for the addin.

If you install your addin with an install tool (i.e. VB's Package and Deployment Wizard) which adds the registry entries, then a simple Windows uninstall does the trick. Also, examine the addin registry entries under the SW program keys. You can then learn to copy the registry keys and include them in your install.
 
The Tick:

Thanks for your response, I'll do some more exploration of these things.

Sorry about my delayed response -- missed 10 days due to creepin' crud.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor