regsvr32和Windows安装程序 [英] regsvr32 and windows installer

查看:88
本文介绍了regsvr32和Windows安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目使用了多个带有Activex控件的dll文件.

My project uses several dll files with activex controls.

现在,我正在制作一个部署项目(Windows安装程序).

Now I am making a deployment project (windows installer).

我需要使用regsvr32通过Windows安装程序注册dll.我该怎么办?我可以检测regsvr32是否失败?

I need to register dlls via windows installer using regsvr32. How should I do it ? And can I detect if regsvr32 failed or not ?

推荐答案

我假设当您说您正在创建部署项目时,您是在谈论Visual Studio中提供的令人讨厌的工作吗?

I assume when you say you're creating a deployment project, you're talking about the nasty piece of work that's available in Visual Studio?

如果是这样,对于每个DLL,您可以查看它们的属性,并将"Register"属性设置为COM.

If so, for each DLL, you can look at their properties, and set the "Register" property to COM.

如果您使用其他一些部署技术(例如Wix,InstallShield等),答案将有所不同,但是其中大多数具有简单的设置,例如这是需要注册的COM dll",而不是您必须先启动regsvr32.

If you're using some other deployment technology (e.g. Wix, InstallShield, etc), then the answer will vary, but most of these have a simple setting to say "this is an COM dll that needs to be registered", rather than you having to kick off regsvr32.

关于检测故障-通过使用内置工具,COM注册会在正常安装过程中进行,而故障会导致安装回滚-无需亲自检查;无需检查文件是否已将其保存到安装位置,也不必担心磁盘已满.

As to detecting failure - by using the built in facilities, the COM registration takes place during the normal install process, and failures cause the install to rollback - there's no need to check this yourself; in much the same way that you don't have to check that your files made it to the install location, and don't have to worry that the disk was full.

这篇关于regsvr32和Windows安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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