使用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 ...
- HDU 2561 第二小整数 (排序)
题意:中文题. 析:输入后,排一下序就好. 代码如下: #include <iostream> #include <cstdio> #include <algorithm ...
- trsd_extract_EDSD_new
# -*- coding:utf-8 -*- import re ''' 适应新版本 ''' year='17A'#用户自定义 ss='./data/'#根目录 filename = ss+'EDSD ...
- obj-c的优缺点
优点: 1) Cateogies : 类别 2) Posing : 扮演 3) 动态识别 : 编译时与运行时动态识别类型 4) 指标计算 : 指针计算 指针的 +- * / 5) 弹性信息传递 : 某 ...
- (字典树)How many--hdu--2609
http://acm.hdu.edu.cn/showproblem.php?pid=2609 How many Time Limit: 2000/1000 MS (Java/Others) Me ...
- lock wait timeout exceeded; try restarting transactio解决方案
问题原因: 今天线上环境,突然出现一个问题,追踪原因是数据库中的一条语句报错,错误内容:lock wait timeout exceeded; try restarting transac ...
- Discoverer Table
http://www.cnblogs.com/fandychen/p/3182826.html EUL4_BAS Table gives list of Business Areas EUL4_OBJ ...
- [leetcode] 20. Valid Sudoku
这道题目被放在的简单的类别里是有原因的,题目如下: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. ...
- 【WP8.1】页面的导航效果
<Page.Transitions> <TransitionCollection> <NavigationThemeTransition> <CommonNa ...
- c# AOP编程:Context与方法拦截
之前做AgentBooking时候,遇到两个问题比较棘手,一个是异常的传递与捕获:如何可以合理地在层层代码调用中统一传递并统一捕获异常.因为如果有一个做法,可以地方统一处理异常,可以使代码减少很多tr ...