Running Syncthing Automatically and Hidden on Log on.
Here are the steps to run Syncthing automatically on startup and hide the terminal window on Windows:
Create a Task in Task Scheduler:
Press `Win + R`, type `taskschd.msc`, and press Enter to open Task Scheduler.
In the Task Scheduler, click on "Create Task..." in the right panel.
In the "General" tab, provide a name for the task (e.g., "Syncthing Autostart").
Select "Run whether user is logged on or not" and check "Do not store password" if you don't want to provide a password.
Check "Run with highest privileges".
Configure the Trigger:
Go to the "Triggers" tab and click on "New...".
Set the "Begin the task" dropdown to "At log on".
Click "OK".
Configure the Action:
-Go to the "Actions" tab and click on "New...".
-Set "Action" to "Start a program".
-Click "Browse..." and navigate to the Syncthing executable (`syncthing.exe`).
-In the "Add arguments" field, add `-no-console -no-browser` to hide the terminal and prevent Syncthing from opening the web interface on startup.
-Click "OK".
Set Conditions and Settings:
-Go to the "Conditions" tab. Ensure "Start the task only if the computer is on AC power" is unchecked if you want it to run on battery power as well.
-Go to the "Settings" tab and ensure "Allow task to be run on demand" is checked. You can also set other preferences as needed.
Finish and Test:
-Click "OK" to finish creating the task.
-You will be prompted to enter your user account password if you chose to run the task with highest privileges.
-To test it, right-click the task in the Task Scheduler library and select "Run".
This setup should start Syncthing automatically when you log in and keep the terminal window hidden.
No Comments