The CompleteFTP installer is a standard NSIS-based Windows installer, which uses a GUI to prompt for various options during installation.
Some organizations prefer to automate installations, and use command-line scripts to roll out software. A GUI-based installer is usually not suitable for this - instead a command-line installer that requires no user input is required. This article describes how to create and use command-line installers for CompleteFTP.
There's a distinction between a first-time installer and an update installer. A first-time installer is used only when a completely new installation is required, or when an existing installation is to be completely overwritten. An update installer should be used when an existing installation is to be updated to a more recent version.
The general pattern for creating and using automated installers is to:
The sections below don't contain the full scripts that must be executed, but rather describe the actions that must be performed.
A first-time installation is an installation onto a machine that either has no current CompleteFTP installation, or has an existing CompleteFTP installation that is to be entirely overwritten.
An activation key (AK) will be required to activate the installation. Certain Volume Licenses provide access to a universal activation key which is very suitable for automated installation as it can be done as part of the install. Without using a universal activation key, each installation will later need to be activated manually.
InstallUtil.exe "C:\Program Files\Complete FTP\Server\CompleteFTPService.exe"
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\CompleteFTP /v Start /t REG_DWORD /d 2 /f
icacls "C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Users" /inheritance:d
icacls "C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Users" /remove:g Users
net start CompleteFTP
When a production installation is being updated, the new binaries may be copied over the old ones, but the configuration data on that machine must not be overwritten. The main difference between the first-time installation and the update is therefore related to the treatment of the data.
net stop CompleteFTP
C:\Program Files\CompleteFTP\cftpconfig
net start CompleteFTP
Versions prior to 22.0.0 were 32-bit applications, so all binaries were under the directory, C:\Program Files (x86)\Complete FTP. From version 22.0.0, CompleteFTP is a 64-bit application, so all binaries are under C:\Program Files\Complete FTP.
Obviously, any references to CompleteFTP files under C:\Program Files (x86)\Complete FTP will need to be modified to point to their new locations. One important change is to the CompleteFTP service, which will need to be changed to point to the new location of the service binary. The easiest way to do this is to uninstall and reinstall the service using the Windows utility InstallUtil.exe. For example:
InstallUtil.exe /u "C:\Program Files (x86)\Complete FTP\Server\CompleteFTPService.exe" InstallUtil.exe "C:\Program Files\Complete FTP\Server\CompleteFTPService.exe"
Version 22.0.0 also brought the shift from SQL Server Compact to SQLite, and the name of the configuration file has changed from config.sdf to config.db.