C# 安装和卸载 Windows Service
特别注意: 安装Window Service 的时候,一定要用管理员打开命令提示符(cmd)
1. 创建Windows Service 服务项目
2. Service设计界面:右键-->选择安装应用程序

生成serviceInstaller1和 serviceProcessInstaller1两个组件
把serviceInstaller1的属性ServiceName改写为你的服务程序名,并把启动模 式设置为AUTOMATIC
把serviceProcessInstaller1的属性account改写为 LocalSystem
安装:

卸载:
切换到 InstallUtil.exe 所在目录下执行:installutil /u yourproject.exe
C# 安装和卸载 Windows Service的更多相关文章
- C# 远程服务器 安装、卸载 Windows 服务,读取远程注册表,关闭杀掉远程进程
这里安装windows服务我们用sc命令,这里需要远程服务器IP,服务名称.显示名称.描述以及执行文件,安装后需要验证服务是否安装成功,验证方法可以直接调用ServiceController来查询服务 ...
- 安装sqlserver 的时候 报错:无法通过Windows功能控制面板自动安装或卸载Windows Server 角色和功能。
无法安装以下功能:.NET Framework 3.5(包括.NET2.0和3.0) 无法通过Windows功能控制面板自动安装或卸载Windows Server 角色和功能. 若要安装Windows ...
- 安装和卸载windows程序
安装windows service通常有两种工具 1.Framework目录下的installutil.exe工具.2.visual studio命令行工具 在这里我要说的是当我们使用的系统是64位的 ...
- 彻底卸载Windows Service
前言,我使用Quartz.net + quartz.config + quartz_jobs.xml 写了个Windows Service,使用如下bat脚本执行服务的安装,启动,暂停,卸载 @ech ...
- C# 创建、安装和卸载Windows服务程序
1.新建一个windows服务程序. 2.点击这个服务类,从工具箱中加入一个Timer控件,右键这个Timer控件 命名为 timerOrderDeductionDetailJob,Enable设为T ...
- 批处理文件安装与卸载Windows服务
//安装Windows服务 将RECPost.exe和RECPostService替换成自己的项目名称和服务名称,并将文件保存成bat格式.其中%cd%是获取相对路径 @echo off set fi ...
- 使用InstallUtil安装及卸载Windows服务的具体操作 Visual Studio 2012版本
关于Visual Studio 2012中使用InstallUtil对Windows服务进行安装与卸载的文章,在MSDN中的http://msdn.microsoft.com/en-us/librar ...
- 安装和卸载windows服务 bat
1. 安装 windows服务 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil [服务路径](例:C:\\test\myt ...
- 安装和卸载windows服务程序
安装window服务 安装命令:InstallUtil.exe MyServiceLog.exe InstallUtil存在路径为:C:\WINDOWS\Microsoft.NET\Framework ...
随机推荐
- 【POI xls Java map】使用POI处理xls 抽取出异常信息 --java1.8Group by ---map迭代 -- 设置单元格高度
代码处理逻辑: 代码流程: 1.首先需要创建一个实体 用来存储 相关信息 package com.sxd.test.unusualName; public class NameEntity { pri ...
- kylin cube测试时,报错:org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x
异常: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, i ...
- C语言常用知识
跳出for循环主要有以下2中方式: 1.用break语句.如: int i; for(i=0; i<10; i++) { if(i>3) // 如果i>3,跳出for循 ...
- python装饰器--@property
@property 考察 Student 类: class Student(object): def __init__(self, name, score): self.name = name sel ...
- Codeforces Round #354 (Div. 2)-B
B. Pyramid of Glasses 题目链接:http://codeforces.com/contest/676/problem/B Mary has just graduated from ...
- css3 -- 过渡与动画
1.注意使用前缀 2.属性: transition-property:none/all/属性 3.持续时间: transition-duration:默认值是0,即使是负值,按照0进行处理 4.tra ...
- Fzu2109 Mountain Number 数位dp
Accept: 189 Submit: 461Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description One ...
- POJ3084 Panic Room(最小割)
把某点与某几点分开的最小花费,当然想到最小割.具体怎么建图,可以画个简单的情况,然后就清楚了: 0到1不受控制,建立0->1容量为INF的边: 1到0受在0一边的一个控制面板的控制,建立1-&g ...
- JSP 中 pageEncoding 和 charset 区别以及中文乱码解决方案
一.JSP 中 pageEndcodeing 和 charset 的作用 <%@ page contentType="text/html;charset=GB2312"%&g ...
- 编程思想┊从实例谈面向对象编程(OOP)、工厂模式和重构
有了翅膀才能飞,欠缺灵活的代码就象冻坏了翅膀的鸟儿.不能飞翔,就少了几许灵动的气韵.我们需要给代码带去温暖的阳光,让僵冷的翅膀重新飞起来.结合实例,通过应用OOP.设计模式和重构,你会看到代码是怎样一 ...