How to build a Syncthing MSI package for distribution #syncthing-msi

This is your Windows environment. E.g. run “systempropertiesadvanced.exe” from the start menu, you can click the last button “environment variables” on the dialog to edit them manually without requiring REGEDIT. Remove STNOUPGRADE “plus” a config.xml where upgrades are enabled and you’re good to go.

image

The database records the schema version and minimum version required to open it, as Catfriend1 guessed. It does not store anything at all related to enabling or disabling upgrades.

1 Like

On my Windows systems the MSI package is installed in

C:\Server\Syncthing\

and the database are in the subfolder there

C:\Server\Syncthing\AppData\index-v0.14.0.db

If I want to run a CLI command, e.g.

C:\Server\Syncthing\syncthing.exe -reset-deltas

not the above data folder is used, instead a folder from the official version is used

C:\Users\>user<\AppData\Local\Syncthing\index-v0.14.0.db

What is instead the right command to run syncthing.exe -reset-deltas?

Same way as you otherwise start it, just adding -reset-deltas if that’s what you want.

I need to check this to be sure… Normally the MSI sets up Syncthing to run under the LocalService account. You could try adding the “config dir” (see docs for exact param name) switch to point at the c:/server/syncthing/appdata directory and ensure your administrative (or user) command prompt has access to this directory by setting NTFS ACL accordingly. I should maybe bundle a batch script to do this so one in the need of this does not have to know all this background.

First time I installed a modified version of MSI, that the package can run internal updates. If I install a newer version of MSI, such settings are lost or not?

If you directly modified the package with Orca, just modify it again. Basically, the first time setup routine will not run on upgrades so modifying the MSI is just necessary for new installations.

This issue brings me back to my request

as an “internal” feature to be platform independent. I have similar issues with Linux Mint and my Synology servers. Would that be possible to implement?

1 Like

Maybe the same possibility here.

That possibility seems no longer to work

I installed Windows 11 and also a new MSI and I modified the newest MSI v1.18.2 with Orca, but I can´t set the update feature as known

Maybe is a better way to implement a feature I can chosse during installation.

1 Like

Is a comment possible?

You should clarify what you are looking a comment on, given this thread is quite lenghty.

What is the correct setting and in which place?

Under win10 it is Systemproperties.exe (win+r key combination). there you will find advanced, environment variables to check if STNOUPGRADE has been set correctly. I hope it is the same for Win11, too (I don’t have it yet.)

Also, just in case, you can do Start → Run → rundll32.exe sysdm.cpl,EditEnvironmentVariables.

1 Like

It works fine with Windows 11 as well. Otherwise I would have been surprised, the basis is Windows 10/8. The error was that I first had an installation with “STNOUPGRADE” = 1 and did not reinstall the MSI before using the MSI with “STNOUPGRADE” = 0.

1 Like