使用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个步骤详细的 ...
随机推荐
- javascript 字符数组转换成以逗号隔开的字符串
var ids = [];angular.forEach(pulsarServers,function (server) { ids.push(server.id);});ids = ids.join ...
- linux系统编程之进程(五):exec系列函数(execl,execlp,execle,execv,execvp)使用
本节目标: exec替换进程映像 exec关联函数组(execl.execlp.execle.execv.execvp) 一,exec替换进程映像 在进程的创建上Unix采用了一个独特的方法,它将进程 ...
- <a href=“#”>
在html中看到这样的属性:<a href=“#”>搜了好久,感觉不甚明白,现记之,等遇到了再做补充. # is called an anchor (or hash...). so the ...
- (最短路) Heavy Transportation --POJ--1797
链接: http://poj.org/problem?id=1797 Heavy Transportation Time Limit: 3000MS Memory Limit: 30000K To ...
- 配置好Nginx后,通过flume收集日志到hdfs(记得生成本地log时,不要生成一个文件,)
生成本地log最好生成多个文件放在一个文件夹里,特别多的时候一个小时一个文件 配置好Nginx后,通过flume收集日志到hdfs 可参考flume的文件 用flume的案例二 执行的注意点 avro ...
- 西邮Linux兴趣小组2014级免试挑战题 (续)
在上一篇的博客中已经解到第四关了,现在继续挑战-- [ 第四关] 在上一关解压成功后,生成了一个file文件.用vim的二进制格式打开,转成十六进制,发现文件头格式如下: 是个以ELF字符开头的文件, ...
- [A,D]=solverAdini(node,elem,bdEdge,h1,h2)
>> [A,D]=solverAdini(node,elem,bdEdge,h1,h2) A = (1,1) 14.5000 (2,1) 11.0000 (3,1) 11.5000 (4, ...
- C99 中 main 函数的写法
今天在论坛看见有人讨论 C 语言中 main 函数的写法,看到结论才知道 main 函数的正确写法. 被老谭酸菜坑了这么多年,还是记录下吧,或许以后某天不搞 .net,回去折腾 C 语言了. 写法1: ...
- Spark Structured Stream 2
❤Limitations of DStream API Batch Time Constraint application级别的设置. 不支持EventTime event time 比process ...
- [ACM_动态规划] UVA 12511 Virus [最长公共递增子序列 LCIS 动态规划]
Virus We have a log file, which is a sequence of recorded events. Naturally, the timestamps are s ...