几何尺寸与公差论坛

 找回密码
 注册
查看: 695|回复: 0

【转帖】fully remove add-in

[复制链接]
发表于 2009-4-13 10:59:24 | 显示全部楼层 |阅读模式
fully remove add-in
yesterday, i attempted to change the compile folder for my sw add-in. what i found was that even though the dll files were being built to the new location, solidworks was still loading the add-in from the original location (oddly, the tooltip in the sw add-in window pointed to the new location).
in order to fix this, i ran regasm.exe /u (in a script that i've modified to remove these add-ins) and the add-in disappeared from the list in sw. when i rebuilt the project, sw still attempted to load the dll from the original location.
this makes me think that while regasm removes the keys necessary to make the add-in available in sw, it does not fully remove all references to it. this begs the question: is there a way to fully remove a plug-in?
i ended up having to change the guid of the dll and rebuild it in the new location. knowing that there are orphaned registry entries annoys me, but i'm not exactly losing sleep over it. should i be?
i'm also curious to know how this influences deployment strategies for this project, especially with regards to code updates. i've been successful simply replacing the files after the plug-in has been registered, but am i better to make a proper installer, or is there another solution?
any input is appreciated!
thanks
just run regasm with /u, and delete the registry entries for the guid from hklm\software\solidworks\solidworks 200x\addins and that is all that is referenced
if i search the registry for references to the name of my toolbar, i find hundreds. are these harmless once the entries you mentioned are removed?
most are probably invalid entries, mru items, cache, history and the likes. all you are concerned about are the ones mentioned above.
i have a module called "registry scrub" that cleans addin registry info.
thanks for the input guys!
i like the idea of the registry scrubber, and i've tried it but was unable to get the it to work. maybe it is just my inexperience with dll's, but i didn't understand the message it gave me.
i selected the appropriate guid from the list, i left the toolbar selection blank, and then i believe it asked me to supply the classid for the typelib. i didn't know what to enter, so it wouldn't continue.
where do i find the classid?
guid = clsid
it should only ask if you exited the form without selecting guid.
i can't check until later. it's been a while since i have used.
i post the .dll on the server along with install and uninstall using regasm (with and without /u)
each time i make a change to my addin, everyone should get the update automatically, i don't have to send out the .dll each time i modify my addin
chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
roland,
the exact message i get is "typelib classid not found from addin. eneter typelib classid." maybe it is something wrong with my addin? obviously i started with the sw addin template, but i don't have a really good grasp on what that code entails.
chris,
i didn't realize that it was possible to register a dll that is located on a network drive. i guess the only down side is that upgrades have to be made without any sessions of solidworks running, correct? (since sw locks the dll)
roland,
just an update: after receiving that message, i entered nothing in the field and clicked cancel. the 'scanning registry' message stayed up, and after letting it run, it returned the full list of registry entries.
the program did quit with an out of memory error, but i'm sure that is related to my poor old computer, not the code.
the entry is gone so aside from that little bug, it seems to have worked perfectly! thanks, good work!
yes, you have to ask everyone to shutdown their sw applications so you can update the dll or you can do it by the end of the day
it's convinient to create a log file and attach to the class_initialize (vb6) or class new (.net) to know who are running the addin - that's how i check before asking other employees to close sw
chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
edited: 09/24/2008 at 10:41 am by chris ch
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 23:07 , Processed in 0.037103 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表