Skip to content

Commit

Permalink
v1.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Stewart committed Feb 21, 2025
1 parent 6e8097b commit b4dd0ff
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 28 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Syncthing Windows Setup (herein referred to as "Setup") provides a [Syncthing](h

* Supports offline installation for Windows-based computers that can't connect to GitHub (see [Offline Installation](#offline-installation))

* Supports non administrative (current user) and administrative (all users) installation (see [Administrative vs. Non Administrative Installation Mode](#administrative-vs-non-administrative-installation-mode))
* Supports non administrative (current user) and administrative (all users) installation (see [Non Administrative vs. Administrative Installation Mode](#non-administrative-vs-administrative-installation-mode))

* When installing for the current user (the default), Setup creates a scheduled task that starts Syncthing at logon (if selected)

Expand Down Expand Up @@ -146,8 +146,8 @@ The following table lists the most common Setup command line parameters:

Parameter | Description
--------- | -----------
`/currentuser` | Runs Setup in non-administrative (current user) installation mode (see [Administrative vs. Non Administrative Installation Mode](#administrative-vs-non-administrative-installation-mode)). This is the default and is recommended for most users.
`/allusers` | Runs Setup in administrative (all users) installation mode (see [Administrative vs. Non Administrative Installation Mode](#administrative-vs-non-administrative-installation-mode)). This installs the Windows service and is recommended for more advanced users. NOTE: You must specify this parameter if performing a reinstall in administrative (all users) installation mode, even if the package is already installed.
`/currentuser` | Runs Setup in non-administrative (current user) installation mode (see [Non Administrative vs. Administrative Installation Mode](#non-administrative-vs-administrative-installation-mode)). This is the default and is recommended for most users.
`/allusers` | Runs Setup in administrative (all users) installation mode (see [Non Administrative vs. Administrative Installation Mode](#non-administrative-vs-administrative-installation-mode)). This installs the Windows service and is recommended for more advanced users. NOTE: You must specify this parameter if performing a reinstall in administrative (all users) installation mode, even if the package is already installed.
`/dir="`_location_`"` | Specifies the installation folder. The default installation folder depends on whether Setup runs in administrative (all users) or non administrative (current user) installation mode.
`/group="`_name_`"` | Specifies the Start Menu group name. The default group name is **Syncthing**.
`/tasks="`_task_[`,`_task_[...]]`"` | Selects one or more tasks on the **Select Additional Tasks** wizard page (see [Setup Tasks](#setup-tasks)).
Expand Down Expand Up @@ -486,6 +486,7 @@ Tool | Installation Mode | Description
------ | ----------------- | -----------
`SetSyncthingConfig.js` | Both | Setup uses this script to create and/or configure the Syncthing configuration file (`config.xml`).
`SyncthingFirewallRule.js` | Both | Adds, removes, and tests for the existence of a Windows Firewall rule for Syncthing (prompts for administrative permissions if required).
`ErrInfo.exe` | Both | Used in scripts to get localized error message strings
`SyncthingLogonTask.js` | Current user (non admin) | Adds or removes a scheduled task that runs the `StartSyncthing.js` script at logon.
`stctl.exe` | Current user (non admin) | Helper program for starting and stopping Syncthing for the current user.
`asmt.exe` | All users (admin) | Helper program for installing and/or resetting the service account and service configuration.
Expand Down
2 changes: 1 addition & 1 deletion SetupVersion.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Setup]
Version=1.28.0.0
Version=1.29.0.0
5 changes: 5 additions & 0 deletions Syncthing.iss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ OutputDir=.
OutputBaseFilename=syncthing-windows-setup
Compression=lzma2/max
SolidCompression=yes
LZMADictionarySize=131072
LZMANumFastBytes=273
LZMAUseSeparateProcess=yes
UsePreviousTasks=yes
WizardStyle=modern
WizardSizePercent=120
Expand Down Expand Up @@ -118,11 +121,13 @@ Source: "shawl-license.txt"; DestDir: "{app}"; Check: IsAdminInstallMode()
Source: "syncthing.ico"; DestDir: "{app}"
; x86compatible binaries
Source: "binaries\i386\asmt.exe"; DestDir: "{app}"; Check: (not IsX64Compatible()) and IsAdminInstallMode()
Source: "binaries\i386\ErrInfo.exe"; DestDir: "{app}"; Check: (not IsX64Compatible()) and IsAdminInstallMode()
Source: "binaries\i386\ServMan.exe"; DestDir: "{app}"; Check: (not IsX64Compatible()) and IsAdminInstallMode()
Source: "binaries\i386\shawl.exe"; DestDir: "{app}"; Check: (not IsX64Compatible()) and IsAdminInstallMode()
Source: "binaries\i386\stctl.exe"; DestDir: "{app}"; Check: (not IsX64Compatible()) and (not IsAdminInstallMode())
; x64compatible binaries
Source: "binaries\x86_64\asmt.exe"; DestDir: "{app}"; Check: IsX64Compatible() and IsAdminInstallMode(); Flags: solidbreak
Source: "binaries\x86_64\ErrInfo.exe"; DestDir: "{app}"; Check: IsX64Compatible() and IsAdminInstallMode()
Source: "binaries\x86_64\ServMan.exe"; DestDir: "{app}"; Check: IsX64Compatible() and IsAdminInstallMode()
Source: "binaries\x86_64\shawl.exe"; DestDir: "{app}"; Check: IsX64Compatible() and IsAdminInstallMode()
Source: "binaries\x86_64\stctl.exe"; DestDir: "{app}"; Check: IsX64Compatible() and (not IsAdminInstallMode())
Expand Down
28 changes: 16 additions & 12 deletions en-SyncthingFirewallRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,26 @@ function getErrorDescription(errorCode) {

// Construct command line
var command = FSO.BuildPath(FSO.GetSpecialFolder(SystemFolder),"cmd.exe") +
" /c " + FSO.BuildPath(FSO.GetSpecialFolder(SystemFolder), "net.exe") +
" helpmsg " + errorCode.toString() + " > \"" + tempName + "\"";
" /c " + FSO.BuildPath(ScriptPath,"ErrInfo.exe -m -n ") +
errorCode.toString() + " > \"" + tempName + "\"";

// Run command (output in temporary file)
WshShell.Run(command,SW_HIDE,true);

try {
var textStream = FSO.OpenTextFile(tempName,ForReading);
var errorDescription = trim(textStream.ReadAll());
}
catch(err) {
var exitCode = WshShell.Run(command,SW_HIDE,true);
if ( exitCode == 3871 ) {
errorDescription = MSG_ERROR_DESC_NOT_FOUND;
}
finally {
textStream.Close();
FSO.DeleteFile(tempName);
else {
try {
var textStream = FSO.OpenTextFile(tempName,ForReading);
var errorDescription = trim(textStream.ReadAll());
}
catch(err) {
errorDescription = MSG_ERROR_DESC_NOT_FOUND;
}
finally {
textStream.Close();
FSO.DeleteFile(tempName);
}
}

if ( errorCode == 0 ) {
Expand Down
28 changes: 16 additions & 12 deletions en-SyncthingLogonTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,26 @@ function getErrorDescription(errorCode) {

// Construct command line
var command = FSO.BuildPath(FSO.GetSpecialFolder(SystemFolder),"cmd.exe") +
" /c " + FSO.BuildPath(FSO.GetSpecialFolder(SystemFolder), "net.exe") +
" helpmsg " + errorCode.toString() + " > \"" + tempName + "\"";
" /c " + FSO.BuildPath(ScriptPath,"ErrInfo.exe -m -n ") +
errorCode.toString() + " > \"" + tempName + "\"";

// Run command (output in temporary file)
WshShell.Run(command,SW_HIDE,true);

try {
var textStream = FSO.OpenTextFile(tempName,ForReading);
var errorDescription = trim(textStream.ReadAll());
}
catch(err) {
var exitCode = WshShell.Run(command,SW_HIDE,true);
if ( exitCode == 3871 ) {
errorDescription = MSG_ERROR_DESC_NOT_FOUND;
}
finally {
textStream.Close();
FSO.DeleteFile(tempName);
else {
try {
var textStream = FSO.OpenTextFile(tempName,ForReading);
var errorDescription = trim(textStream.ReadAll());
}
catch(err) {
errorDescription = MSG_ERROR_DESC_NOT_FOUND;
}
finally {
textStream.Close();
FSO.DeleteFile(tempName);
}
}

if ( errorCode == 0 ) {
Expand Down
8 changes: 8 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Below are the release notes for Syncthing Windows Setup (herein after referred to as Setup).

## 1.29.0 (2024-02-21)

* Updated [shawl](https://github.com/mtkennerly/shawl/) to version 1.7.0.

* Added [ErrInfo](https://github.com/Bill-Stewart/ErrInfo/) for use within scripts.

* Built using Inno Setup 6.4.1.

## 1.28.0 (2024-12-03)

* Setup now defaults to non administrative (per user) installation mode. To install the service, you must specify the `/allusers` parameter on Setup's command line.
Expand Down

0 comments on commit b4dd0ff

Please sign in to comment.