在Windows安装项目中注册和注销DLL [英] Register and unregister a DLL in a Windows Setup Project

查看:103
本文介绍了在Windows安装项目中注册和注销DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个dll文件,分别安装/卸载Windows安装程序时需要注册/注销。

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

我尝试了以下操作-
创建了一个.bat文件来注册dll。问题是我无法在安装项目中使用自定义操作添加.bat文件。

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.

此外,如何在卸载时运行dll注销?请指教。谢谢。

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

推荐答案

下面的信息是我的注册dll步骤:
1:添加公用文件文件夹。
2:添加您想要将dll文件注册到此文件夹中。
3:将dll文件的属性注册修改为 vsdrfCOMSelfReg

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"

已完成设置。

安装项目后,您会发现您的公用文件夹存在dll(例如我的路径C:\Program Files(x86)\Common Files)

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

您可以找到dll密钥也已在您的注册表编辑器中注册。

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

如果您卸载项目,则下面的信息也将被删除。

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

这篇关于在Windows安装项目中注册和注销DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆