Files
winsw/docs/cli-commands.md
Next Turn dcf3013f75 Revise docs for 3.0.0-alpha.3 (#608)
* Mention optional settings

* Mention removed settings

* Add links to system requirements

* markdownlint fixes

* Remove trailing spaces

* Mention boolean elements

* Add preshutdown

* Add `dev ps` command

* Stop misleading

* Why aren't you using Windows 10?

* Add `stdoutPath`/`stderrPath`

* Relative paths and the default working directory

* Send a close message to Windows (GUI) apps

* Use valid XML

* Add `customize` and `dev kill` commands

* Update README.md

* Add commands

* Fix spacing

* Update installation.md

* Update README.md
2020-08-11 07:54:32 +08:00

4.7 KiB

CLI commands

install command

Installs the service.

Usage

winsw install [<path-to-config>] [--no-elevate] [--user|--username <username>] [--pass|--password <password>]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

  • --user|--username <username>

    Specifies the user name of the service account.

  • --pass|--password <password>

    Specifies the password of the service account.

uninstall command

Uninstalls the service.

Usage

winsw uninstall [<path-to-config>] [--no-elevate]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

start command

Starts the service.

Usage

winsw start [<path-to-config>] [--no-elevate]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

stop command

Stops the service.

Usage

winsw stop [<path-to-config>] [--no-elevate] [--no-wait]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

  • --no-wait

    Doesn't wait for the service to actually stop.

  • --force

    Stops the service even if it has started dependent services.

restart command

Stops and then starts the service.

Usage

winsw restart [<path-to-config>] [--no-elevate]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

  • --force

    Restarts the service even if it has started dependent services.

status command

Checks the status of the service.

Usage

winsw status [<path-to-config>]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

test command

Checks if the service can be started and then stopped without installation.

Usage

winsw test [<path-to-config>] [--no-elevate] [--timeout <timeout>] [--no-break]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

  • --timeout <timeout>

    Specifies the number of seconds to wait before the service is stopped. If not specified or -1 is specified, WinSW waits for a keystroke indefinitely.

  • --no-break

    Ignores keystrokes. If specified, WinSW waits for Ctrl+C.

refresh command

Refreshes the service properties without reinstallation.

Usage

winsw refresh [<path-to-config>] [--no-elevate]

Arguments

path-to-config

The path to the configuration file. If a file isn't specified, WinSW searches the executable directory for a .xml file with the same file name without the extension.

Options

  • --no-elevate

    Doesn't automatically trigger a UAC prompt.

customize command

Customizes the wrapper executable.

Usage

winsw customize -o|--output <output> --manufacturer <manufacturer>

Options

  • -o|--output <output>

    Required. Specifies the path to the output file.

  • --manufacturer <manufacturer>

    Specifies the manufacturer name of the customized executable.

dev ps command

Draws the process tree associated with the service.

Usage

winsw dev [<path-to-config>] ps