Skip to content

docs: add more context to Windows execution #926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions users/autostart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,26 @@ by a sysadmin who knows enough to understand the security implications.
#. Start the service via ``sc start syncthing`` in the Command Prompt.
#. Connect to the Syncthing UI, enable HTTPS, and set a secure username and password.

For Advanced Users
^^^^^^^^^^^^^^^^^^

It's possible to run Windows Task Scheduler CLI API with a command such as
``schtasks /create /sc ONLOGON /tn Syncthing /tr "<program-path> [--no-console --no-browser]"``.
The operation requires elevated privileges. Preventing the pop-up console that hides after
some delay is possible wrapping the executable with a ``PowerShell`` script.

``script.ps1``::

Start-Process "<path to syncthing>.exe" -WindowStyle Hidden

Then run as admin::

schtasks /create /sc ONLOGON /tn Syncthing /tr "powershell <path to script>.ps1"


For more information, please read official docs for Command Line Interface API:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks

macOS
-----

Expand Down