Register and unregister a DLL in a Windows Setup Project

二次信任 提交于 2019-12-10 07:04:39

问题


I have couple of dll files that need to be registered/unregistered when a Windows installer is installed/uninstalled respectively.

I tried the following - Created a .bat file to register the dll. The issue is I am not able to add a .bat file using 'Custom Actions' in Setup Project.

Also, how to run unregister dll while uninstalling ? Please advice. Thanks.


回答1:


Below info is my register dll step: 1:Add "Common Files Folder". 2:Add your want to register dll files into this folder. 3:Modify dll file's property "Register" to "vsdrfCOMSelfReg"

setting done.

after you install your project, you can find your common folder exist dll (like my path C:\Program Files (x86)\Common Files)

You can find dll key has been registered in your regedit too.

If you uninstall your project, below info will been removed.



来源:https://stackoverflow.com/questions/9490524/register-and-unregister-a-dll-in-a-windows-setup-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!