Bill-Stewart / SyncthingWindowsSetup

Syncthing Windows Setup
Mozilla Public License 2.0
1.07k stars 44 forks source link

Autostart does nothing, never autostarts #39

Closed ToothyDev closed 3 weeks ago

ToothyDev commented 3 weeks ago

When installing syncthing on Windows, it gives you a toggle on whether you want it to start on user logon. Yet, it does nothing. It doesn't start on logon, nor does it register a service, put a shortcut in the startup folder or even just a task scheduler entry. Nothing. Why have this toggle if it does nothing? This happens regardless of running syncthing's installer with admin or not.

Bill-Stewart commented 3 weeks ago

...it gives you a toggle on whether you want it to start on user logon.

By "toggle" I assume you mean "check box." Which specific check box are you referring to?

I just tested the 1.27.11 installer on a Windows 11 machine, and all of the automatic startup stuff worked just fine for both current user and installing as a service.

Yet, it does nothing.

You're going to have to be more specific about what you mean. (Remember, nobody can see your screen!)

This happens regardless of running syncthing's installer with admin or not.

What, specifically, "happens" (or doesn't "happen")?

The behavior of the installer is very different between the non administrative (per user) and administrative (per computer) installation modes.

Have you reviewed the documentation?

(Again: Remember that nobody can see your screen.)

ToothyDev commented 3 weeks ago

I'm talking about this checkbox image It's selected by default (i also tried unchecking and rechecking it), though, well, nothing happens apparently (as i said, no service or task scheduler or anything i can find) and syncthing does indeed not start on login even after giving it a few minutes. I'm using the per user mode. I'm on Windows 11 as well, latest update and all. For funs i also tried checking the toggle below that only autostarts when connected to AC (i dont have a laptop but might as well) but equally, no autostart

ToothyDev commented 3 weeks ago

Also, I just remembered that i get the following error when installing, everytime and even with admin image Might be related

Bill-Stewart commented 3 weeks ago

Yes. You need to fix that error first.

Bill-Stewart commented 3 weeks ago

See this issue also:

https://github.com/Bill-Stewart/SyncthingWindowsSetup/issues/20

This is not a Syncthing Windows Setup issue but rather something broken on your machine. I can't reproduce it.

ToothyDev commented 3 weeks ago

Alright, I did some digging and found a fix. Thought it might help others to keep this here

I went to HKEY_CLASSES_ROOT\.js in the registry and changed (Default) back to JSFile. PHPstorm (which i don't even have installed anymore) was still registered there, and after rerunning the install, syncthing also properly set up a task in the task scheduler.

Bill-Stewart commented 3 weeks ago

Thanks for the update and the fix!