diff --git a/users/autostart.rst b/users/autostart.rst index 84d60b0e..a0178142 100644 --- a/users/autostart.rst +++ b/users/autostart.rst @@ -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 " [--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 ".exe" -WindowStyle Hidden + +Then run as admin:: + + schtasks /create /sc ONLOGON /tn Syncthing /tr "powershell .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 -----