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 ...
随机推荐
- Windows7系统主题制作全程教程
jpg 改 rar
- hash 分区的用途是什么?
Hash partitioning enables easy partitioning of data that does not lend itself to rangeor list partit ...
- DataTables - 问题集
1.增加额外搜索条件 var reqData = {}; var extraSearch = []; var oTable = $('table selector').dataTable({ 'aja ...
- Codeforces Round #355 (Div. 2)-A
A. Vanya and Fence 题目连接:http://codeforces.com/contest/677/problem/A Vanya and his friends are walkin ...
- Swift3.0语言教程使用字符串创建和初始化字符串
Swift3.0语言教程使用字符串创建和初始化字符串 Swift3.0语言教程使用字符串创建和初始化字符串,在编程语言中,字面值是很常见的数据描述形式.人们可以通过字面所表达的意思,获知其含义,尤其是 ...
- 贪心+模拟 Codeforces Round #288 (Div. 2) C. Anya and Ghosts
题目传送门 /* 贪心 + 模拟:首先,如果蜡烛的燃烧时间小于最少需要点燃的蜡烛数一定是-1(蜡烛是1秒点一支), num[g[i]]记录每个鬼访问时已点燃的蜡烛数,若不够,tmp为还需要的蜡烛数, ...
- nav元素
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- ural 2068. Game of Nuts
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...
- ural 1346. Intervals of Monotonicity
1346. Intervals of Monotonicity Time limit: 1.0 secondMemory limit: 64 MB It’s well known that a dom ...
- (转)distcp从ftp到hdfs拷贝文件
link :http://blog.csdn.net/sptoor/article/details/11523469 distcp从ftp到hdfs拷贝文件: hadoop distcp ftp:// ...