Wix安装程序将INSTSRV和SRVANY替换为用户定义的服务安装 [英] Wix installer to replace INSTSRV and SRVANY for user defined service installation

查看:81
本文介绍了Wix安装程序将INSTSRV和SRVANY替换为用户定义的服务安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio C#Express创建了可执行文件MyService.exe. Express版本中没有创建服务的选项.过去,如 MSDN文章中所述,已使用INSTSRV和SRVANY将其手动安装为用户定义的服务. 如何创建用户定义的服务"

I created an executable MyService.exe using Visual Studio C# Express. There are no options in the Express version to create a service. In the past, this has been manually installed as a user defined service using the INSTSRV and SRVANY as described in the MSDN Article 'How To Create a User-Defined Service'

是否可以为此文件创建一个wix 3.5安装程序

Is it possible to create a wix 3.5 installer for this file that

  1. 不需要在目标计算机上存在SRVANY.exe和INSTRV.exe文件
  2. 不将INSTSRV.exe用作自定义操作

推荐答案

WiX确实支持安装Windows服务,但仅支持本机服务.这意味着应用程序必须编写为服务.

WiX does support installing Windows services, but only native ones. This means that the application must be written as a service.

由于您的应用程序使用SRVANY.EXE作为服务运行,因此您有两个选择

Since your application uses SRVANY.EXE to run as a service, you have two options

  • 将您的应用程序重写为本地Windows服务

  • use custom actions to execute the SRVANY.EXE and INSTSRV.EXE command lines

这篇关于Wix安装程序将INSTSRV和SRVANY替换为用户定义的服务安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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