-
Notifications
You must be signed in to change notification settings - Fork 618
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
Changes from 1 commit
893167c
8a2f21a
f710ea2
b063a95
893ace5
e1ef970
8222784
1064409
0e6f217
3eb4614
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,27 +34,8 @@ start Syncthing automatically either at user log on, or at system | |
| startup. In both cases, Syncthing will open and stay invisible in | ||
| background. | ||
|
|
||
| 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 ``.vbs or .ps1``. | ||
|
|
||
| vbs:: | ||
|
|
||
| Dim objShell | ||
| Set objShell = CreateObject("WScript.Shell") | ||
| objShell.Run "path to syncthing.exe", 0, False | ||
| Set objShell = Nothing | ||
|
|
||
| ps1:: | ||
|
|
||
| Start-Process "path to syncthing.exe" -WindowStyle Hidden | ||
|
|
||
| For technical information about Task Scheduler visit | ||
| https://docs.microsoft.com/windows/win32/taskschd | ||
| https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks | ||
|
|
||
| Or follow the Graphical tutorial below: | ||
|
|
||
| #. Start the Task Scheduler either by going to ``Start Menu > Windows | ||
| Administrative Tools`` and clicking on ``Task Scheduler``, or by | ||
|
|
@@ -271,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 Hard 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your schtasks example includes Also, isn't
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
https://forum.syncthing.net/t/win-10-and-11-updates-breaks-no-console/19142 I was trying the Switching to the mentioned Wrapping with a
https://learn.microsoft.com/pt-br/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.5 If you give the path as a first argument, it assumes that is the -FilePath flag as you can see above.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might also try
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I've not tested it. Feel free to contribute and do it. I don't have Windows installation on my PC right now...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I wasn't referring to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It still works without
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Unfortunately @rasa example is what happening in my system too.
So, the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I can only find docs offline about |
||
|
|
||
| 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 | ||
| ----- | ||
|
|
||
|
|
||



Uh oh!
There was an error while loading. Please reload this page.