问题
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