C#Windows服务程序安装常见问题解决方法

时间:2023-03-09 09:48:29
C#Windows服务程序安装常见问题解决方法

C#Windows服务程序安装是如何的呢?让我们开始吧:

C#Windows服务程序安装1、

在服务程序的是设计窗体中,点击右键“添加安装程序”,添加服务安装程序。否则,安装时会出现如下

错误:

正在安装程序集“C:\Program\xx.exe”。

受影响的参数是:

  1. logtoconsole =
  2. assemblypath = C:\Program\xx\xx.exe
  3. logfile = C:\Program\xx.InstallLog

没有 RunInstallerAttribute.Yes 的公共安装程序。在 C:\Program\xx.exe 程序集中可能可以找到

“Yes”属性。

正在提交程序集“C:\Program\xx.exe”。

受影响的参数是:

  1. logtoconsole =
  2. assemblypath = C:\Program\xx.exe
  3. logfile = C:\Program\xx.InstallLog

没有 RunInstallerAttribute.Yes 的公共安装程序。在 C:\Program\xx.exe 程序集中可能可以找到

“Yes”属性。

C#Windows服务程序安装2、

将serviceProcessInstaller1->Accout属性,设为:LocalSystem(默认是User)。

否则将会出现如下错误:

windows服务安装时,出错:System.ComponentModel.Win32Exception: 帐户名无效或不存在,或者密码对

于指定的帐户

C#Windows服务程序安装3、

安装:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe  FilePath\xx.exe

卸载:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -u FilePath\xx.exe

C#Windows服务程序安装的具体实现就向你介绍到这里,希望对你了解和学习C#Windows服务程序安装有所帮助。

来源:http://www.cnblogs.com/aji88/archive/2012/04/17/2453427.html