自定义Visual Studio设置项目. [英] Custom visual studio set up project.

查看:84
本文介绍了自定义Visual Studio设置项目.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了这套Windows应用程序,需要为他们开发一个安装程序,以便用户可以选择是否希望像在Microsoft Office中一样安装一个或多个应用程序.最初,我编写了一个自定义操作dll作为自定义操作添加到项目中,不幸的是,用于选择要安装的项目的单个对话框不起作用,因为我无法将INSTANCE传递给它(HINSTANCE是DialogBox函数的第一个参数),所以我决定使用可执行文件而不是dll,而是编写了Windows应用程序.该可执行文件有效.我只需为用户所做的每个选择调用MsiInstallProduct函数.但是,当我将可执行文件作为自定义操作添加到安装项目时,安装程​​序将继续执行,运行我的可执行文件,但稍后报告该可执行文件未完成执行.单击确定后,安装程序将回滚.


什么可能是问题,什么可能是解决方案.是我的可执行文件返回了错误的值.如果成功,我通常会返回ERROR_SUCCESS.

还是可能是因为我在进行另一次安装时正在尝试进行安装?

我不知道这种使用XML和功能表的Msi方法.
如果这个问题不能解决问题,我正在考虑使用MSI/XML方法.任何人都可以告诉我在哪里可以得到适合我的目的的示例(或者更好的是可自定义的XML/MSI模板代码)MSI/XML代码.


我希望做的是为用户提供一种选择方式,可以安装一个或多个应用程序选项,然后再安装用户选择项.我可能需要一个功能表.(我不太了解这些TABLES东西).


在极端情况下,我不介意使用其他安装程序易于使用并且可以为我提供此功能.

There is there is this set of windows application that I developed and need to develop an installer for them such that users can select whether they wish to install one or more of the application just as it is done in Microsoft Office. At first I wrote a custom action dll to add to the project as a custom action, unfortunately, the single dialogue box for making selections of project to install did not work, because I had no means of passing an INSTANCE to it(HINSTANCE is the first parameter of DialogBox function) so I decided to use an executable instead of a dll.I wrote a windows application instead. This executable worked. I simply call MsiInstallProduct function for every selection made by user. However, when I added the executable as a custom action to the setup project, the installer will proceed, run my executable but later report that the executable did not finish execution. Once I click Ok, the installer rolls back.


What could be the problem and what could be the likely solution. Is that my executable is returning the wrong value. I usually return ERROR_SUCCESS on success.

Or could it be that it is because I am attempting to do an installation while another installation is going on?

I don''t know this Msi approach that uses XML and feature table.
If this problem defies solution,I am thinking of using the MSI/XML approach. Could anyone tell me where I can get a sample(or better still a customizable XML/MSI template code) MSI/XML code that I can adapt to suit my purpose.


What I wish to do is to give users a means of selectionone or more options of applications to install and then install the user selection. I probably will need a feature table.( I don''t really know these TABLES stuff).


In the extreme case, I don''t mind using another installer is easy to use and can give me this capability.

Enhzflep:删除了标题中的单词我需要紧急帮助,以便更多地关注这个问题
Enhzflep: removed words I need urgent help with from the title, in the interests of having more attention afforded the question

>

推荐答案

安装程序按功能进行组织.
每个功能都是您要安装的应用程序.
每个功能将包含几个组件.
组件可以是文件或注册表项.
每个组件都可以具有一个密钥文件,如果该文件被删除或损坏,则会自动安装.

因此,基本上,您要做的就是创建多个组件,然后将要素映射为使用一个或多个组件.

在此处详细了解- http://www.advancedinstaller.com/user-guide/organization.html [< ^ ]
An installer is organized as features.
Each feature would be an application that you wish to install.
Each feature would contain several components.
A component may be a file or registry key.
Each component can have a key file that is automatically installed if removed or damaged.

So basically what you would do is create several components and then map the features to use one or more components.

Read more about it here - http://www.advancedinstaller.com/user-guide/organization.html[^]


这篇关于自定义Visual Studio设置项目.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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