使用TopShelf做windows服务安装 ---安装参数解释
转自:https://topshelf.readthedocs.io/en/latest/overview/commandline.html
Topshelf Command-Line Reference
Once a service has been created using Topshelf, an extensive command-line vocabulary is available which can be used to install, uninstall, start, and configure the service.
The command-line help can be displayed at any time by entering myService.exe help on the command-line.
Help Text
The help text from the command line is shown below for easy reference.
service.exe [verb] [-option:value] [-switch]
run Runs the service from the command line (default)
help or –help Displays help
install Installs the service
-username The username to run the service -password The password for the specified username -instance An instance name if registering the service multiple times --autostart The service should start automatically (default) --disabled The service should be set to disabled --manual The service should be started manually --delayed The service should start automatically (delayed) --localsystem Run the service with the local system account --localservice Run the service with the local service account --networkservice Run the service with the network service permission --interactive The service will prompt the user at installation for the service credentials --sudo Prompts for UAC if running on Vista/W7/2008 -servicename The name that the service should use when installing -description The service description the service should use when installing. Eg: -description: MyService Eg: -description “My Service” -displayname The display name the the service should use when installing Eg: -displayname: MyService Eg: -displayname “My Service” start Starts the service if it is not already running
-instance The instance to start stop Stops the service if it is running
-instance The instance to stop uninstall Uninstalls the service
-instance An instance name if registering the service multiple times --sudo Prompts for UAC if running on Vista/W7/2008
Examples
Basic Service Installation
MyService.exe install -username:DOMAINServiceAccount -password:itsASecret -servicename:AwesomeService –autostart
Service Installation with Quoted Arguments
MyService.exe install -username “DOMAINService Account” -password:”Its A Secret” -servicename “Awesome Service” –autostart
使用TopShelf做windows服务安装 ---安装参数解释的更多相关文章
- 使用TopShelf做windows服务
class Program { static void Main(string[] args) { HostFactory.Run(x => { x.RunAsLocalSystem(); x. ...
- 为C# Windows服务添加安装程序
最近一直在搞Windows服务,也有了不少经验,感觉权限方面确定比一般程序要受限很多,但方便性也很多.像后台运行不阻塞系统,不用用户登录之类.哈哈,扯远了,今天讲一下那个怎么给Windows服务做个安 ...
- (转)为C# Windows服务添加安装程序
本文转载自:http://kamiff.iteye.com/blog/507129 最近一直在搞Windows服务,也有了不少经验,感觉权限方面确定比一般程序要受限很多,但方便性也很多.像后台运行不阻 ...
- 使用InstallUtil对Windows服务进行安装与卸载
关于Visual Studio 2012中使用InstallUtil对Windows服务进行安装与卸载的文章,在MSDN中的http://msdn.microsoft.com/en-us/librar ...
- C# VS2010 windows服务的安装
可能是太过于懒惰的原因,研究个windows 服务的安装程序都花了大半天时间.在网上看了一些示例,大部分都言过其实,把过程搞得太过复杂,老是需要去研究如何利用InstallUtil.exe及其参数.事 ...
- Windows服务的安装卸载及错误查找
@echo off echo 清理原有服务项. . . %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil /U D:\abc\te ...
- C#操作windows服务,安装、卸载、停止、启动
public class ServiceUtil { private string _ServiceName = string.Empty; private string _AppName = str ...
- 制作Windows服务和安装程序(C#版)
http://blog.sina.com.cn/s/blog_5f4ffa170100vt2b.html 1.创建服务项目: 打开VS 2005 编程环境,在C#中新建Windows服务程序 2.将安 ...
- 使用Topshelf创建Windows服务
概述 Topshelf是创建Windows服务的另一种方法,老外的一篇文章Create a .NET Windows Service in 5 steps with Topshelf通过5个步骤详细的 ...
随机推荐
- Python特殊方法
# __slots__如果要限制添加的属性,例如,Student类只允许添加 name.gender和score 这3个属性,就可以利用Python的一个特殊的__slots__来实现. # __sl ...
- Java源码更改的方式
1.找到要改的类所在包名地址. 比如标签名的更改: <s:debug></s:debug> (1)ctril+鼠标左键========双击标签,就会弹出标签所在的类的文本 (2 ...
- 进度条ProgressBar
在本节中,作者只写出了进度条的各种样式,包括圆形.条形,还有自定义的条形,我想如果能让条形进度条走满后再继续从零开始,于是我加入了一个条件语句.作者的代码中需要学习的是handler在主线程和子线程中 ...
- HDU 2136 Largest prime factor (素数打表。。。)
题意:给你一个数,让你求它的最大因子在素数表的位置. 析:看起来挺简单的题,可是我却WA了一晚上,后来终于明白了,这个第一层循环不是到平方根, 这个题和判断素数不一样,只要明白了这一点,就很简单了. ...
- noip第9课作业
1. 打印乘法表 [问题描述] 用for循环实现输出1至9的乘法表 [样例输出] 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4 ...
- 5款替代微软Visio的开源免费软件(转)
5款替代微软Visio的开源免费软件 提到流程图和图表设计,自然会想到微软出品的Office Visio,它是一款强大的流程图设计工具.Visio并不在Office标准套装中,需要额外付费购买,这可能 ...
- hdu 4004 最大值最小化
http://acm.hdu.edu.cn/showproblem.php?pid=4004 一条线段长度为L,线段上有n个点,最多选取 m-1 个点,使得包括线段端点在内的相邻点之间的最大距离值最小 ...
- log4j自动加载原理
java虚拟机加载log4j的类(LogManager.class)后,执行静态代码块,这个类中的静态代码块,会load log4j的配置文件,依次加载log4j.xml,log4j.properti ...
- Java核心编程快速学习(转载)
http://www.cnblogs.com/wanliwang01/p/java_core.html Java核心编程部分的基础学习内容就不一一介绍了,本文的重点是JAVA中相对复杂的一些概念,主体 ...
- C#: 线程间操作无效: 从不是创建控件“dataGridView”的线程访问它
最近在修改自动化小工具,用多线程来解决后台拷贝导致WinForm界面卡死的情况,但是遇到过错:线程间操作无效: 从不是创建控件“dataGridView”的线程访问它. 这是因为在多线程程序中,新创建 ...