如何使用Visual Studio 2010创建C ++ MSI自定义操作DLL? [英] How to create a C++ MSI Custom Action DLL using Visual Studio 2010?

查看:314
本文介绍了如何使用Visual Studio 2010创建C ++ MSI自定义操作DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我要在C#自定义操作中中止安装,则必须显示一个不需要的1001错误消息框。

If I want to abort an installation in a C# custom action, it will have to display an unwanted "1001 Error" message box.

我试图再次创建这个C ++项目,但我在互联网上找到的唯一教程

I'm trying to create this C++ project again but the only tutorial I found on the internet

http:// www.codeproject.com/Articles/1747/MSI-Custom-Action-DLL

自2002年以来未更新。如何做同样的VS 2010?

isn't updated since 2002. How can I do the same on VS 2010?

推荐答案

这个例子已经过时。今天最简单的方法是下载并安装Windows Installer XML( http://wix.codeplex.com )。然后说File |新项目| Windows Installer | C ++自定义操作

That example is outdated. The easiest way today is to download and install Windows Installer XML (http://wix.codeplex.com). Then say File | New Project | Windows Installer | C++ Custom Action

还需要注意的是C#自定义操作项目。您的1001错误消息告诉我,您正在使用InstallUtil / Installer类自定义操作。 WiX中的C#项目类型称为部署工具基础(DTF),远远优于。请查看以下内容,了解它的工作原理,并将其作为C ++自定义操作显示给MSI。

Also of note is the C# custom action project. Your 1001 error message tells me that you are using InstallUtil / Installer Class custom actions. The C# project type in WiX is called Deployment Tools Foundation (DTF) and is far superior. Checkout the following for an explanation of how it works and appears to MSI as a C++ custom action.

部署工具基础(DTF)管理的自定义操作

这篇关于如何使用Visual Studio 2010创建C ++ MSI自定义操作DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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