自定义安装操作 [英] Custom install actions

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

问题描述

我现在发现了很多例子,但都不是明智的选择.

I have now found numerous examples and am none the wiser.

简介很简单.在安装期间,应弹出对话框,并询问用户DB凭证.然后应使用它们来创建注册表项.密钥的路径始终相同,但是密钥本身是从用户输入生成的数据库连接字符串.

The brief is simple. During install time a form of dialog should pop up and ask the user for DB credentials. These should then be used to create a registry entry. The path of the key is always the same but the key itself is a DB Connection string generated from the user input.

它应该询问服务器,数据库名称,用户和密码.有一个测试"按钮会很好,但不是必需的.

It should ask for a server, db name, user and password. It would be nice to have a 'test' button but not essential.

这是针对Windows服务的.

This is for a windows service.

似乎我要添加一个从安装程序继承的类,并覆盖安装和卸载方法.就我所知,直到信息变得乱码为止.

It looks like I go about adding a class that inherits from installer and override the install and uninstall methods. That's about as far as I get before the information becomes garbled.

该信息不在我的书中:).关于如何在安装服务时如何向用户显示表单以及如何使用对表单的响应来生成注册表项的任何想法.

The information is not in my book :). Any ideas how I can present the user with a form when installing my service, and using the responses to the form to generate a registry key.

欢呼

p.s.

响应响应;).环境是Visual Studio,目标系统是Windows2003.服务器是使用.net框架V2开发的.

In response to responses ;). The environment is Visual Studio and the target system is windows 2003. The server has been developed using the .net framework V2.

这是在Visual Studio中创建的用于安装服务的标准安装项目.

This is a standard setup project created in visual studio that installs the service.

推荐答案

Visual Studio作为安装作者非常有限,我什至不确定是否可以实现您所追求的目标.如果您一定要使用Windows Installer,建议您查看 WiX .否则, NSIS 可能是适合您的工具.

Visual Studio is very limited as an installation author, and I'm not even sure it's possible to achieve what you're after with it. If you're bound to using Windows Installer, I suggest taking a look at WiX. If not, NSIS might be the tool for you.

这篇关于自定义安装操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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