zoukankan      html  css  js  c++  java
  • 使用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
  • 相关阅读:
    CentOS虚拟机和物理机共享文件夹实现
    集训第六周 数学概念与方法 概率 数论 最大公约数 G题
    集训第六周 数学概念与方法 概率 F题
    集训第六周 E题
    集训第六周 古典概型 期望 D题 Discovering Gold 期望
    集训第六周 古典概型 期望 C题
    集训第六周 数学概念与方法 UVA 11181 条件概率
    集训第六周 数学概念与方法 UVA 11722 几何概型
    DAG模型(矩形嵌套)
    集训第五周 动态规划 K题 背包
  • 原文地址:https://www.cnblogs.com/liyangLife/p/7248759.html
Copyright © 2011-2022 走看看