安装项目 - 允许多次安装同一 Windows 服务
我有一个关于.Net(c#语言,Framework 4.0)中的安装项目的问题:
我为Windows服务创建了一个安装项目,在安装向导中,用户必须输入要安装的Windows服务的名称。安装程序还会创建卸载程序的快捷方式,以防用户想要删除该 Windows 服务。
问题是:如何让用户指定不同的服务名称多次运行相同的安装程序? 可能需要此行为,因为 Windows 服务是连接到服务器并检索数据的套接字使用者;为了利用服务器功能,用户可以多次安装相同的 Windows 服务并指向服务器上的不同端口,以更快地执行数据检索任务。服务是一样的,用户只需修改服务配置文件上的端口,因此每次创建新版本的安装程序是不合逻辑的。
任何线索或建议将不胜感激,提前致谢。
I have a question regarding to Setup Projects in .Net (c# language, Framework 4.0):
I made a setup project for a Windows Service, on the installation wizard, the user must input the name of the Windows Service as it would be installed. The setup program also creates a shortcut to the Uninstall program in case the user wants to remove that Windows Service.
The question is: how to let the user run the same setup program several times specifing different service name?
This behaviour could be required because the windows service is a socket consumer that connects to a server and retrieves data; to take advantage of the server capabilities the user could install the same windows service multiple times pointing to a different port on the server, to perform the data retrieving task much faster. The service is the same, the user just modify the port on the configuration file of the service, so that's why it's not logical to create a new version of the installer each time.
Any clue or suggestion would be appreciated, thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可以通过使用多实例安装来完成。一般方法是:
转换应至少更改 PackageCode、ProductCode 和 UpgradeCode。
Visual Studio 安装项目不支持此功能。因此,您可以手动执行此操作,也可以使用支持多个实例的商业设置创作工具。
This can be done by using an multiple instances installation. The general approach is:
The transform should change at least the PackageCode, ProductCode and UpgradeCode.
This is not supported by Visual Studio setup projects. So either you do it manually or use a commercial setup authoring tool which supports multiple instances.