Most organizations utilize deployment tools, such as Microsoft Endpoint Configuration Manager (Configuration Manager, also known as ConfigMgr or SCCM), formerly System Center Configuration Manager and Systems Management Server (SMS) to deploy software and associated configuration files. This allows scripting experts to deploy any required configuration files to the appropriate location after the software is installed.


However, FlexSoftware also provides a method for deploying pre-configured workspace, session, keyboard, macro, etc. files for use with Flex Terminal Emulator. This allows administrators to quickly and easily provide a standard set of configuration files to end users, so when they start the application, it automatically connects to the host and presents the login screen.


The information below will assist administrators with configuration deployment:


Concept

The concept is simply a matter of gathering the Flex Terminal Emulator configuration files from an existing installation and placing them into a folder that the Flex Terminal Emulator installation will read and copy the contents to C:\ProgramData\FlexSoftware\Flex Terminal Emulator\Config. Then, as each user launches the Flex Terminal Emulator application for the first time, the configuration files are copied to their own Flex Terminal Emulator User Data Directory.


Steps

Follow the steps below for configuration deployment:

    1. Install Flex Terminal Emulator, create all required configuration files, including workspaces, sessions, macros, etc. and configure all desired settings.


    1. Create a folder named Config in the same location as the Flex Terminal Emulator installation. For example, if installing from \\ServerName\FlexInstall\Flex_64bit.exe, then create the folder \\ServerName\FlexInstall\Config.

    2. Copy the contents of the Flex Terminal Emulator User Data directory from the machine used in step 1 to the Config folder created in step 2. By default this will be %USERPROFILE%\Documents\FlexSoftware\Flex Terminal Emulator\.

    3. Use one of the methods below to install Flex Terminal Emulator.


Installation Methods

The following installation methods are used in conjunction with the Config folder to deploy Flex Terminal Emulator configuration files:


Self-Extracting Zipped Executable

To use a zipped executable installer, you must open a command prompt and issue a command like below to specify the target folder for the temporary extracted files (which is the MSI file):


"C:\Downloads\FlexInstall\Flex_64bit.exe" /t:"C:\Downloads\FlexInstall"

Note: the location specified by the /t: switch must be where the Config folder is located.


Microsoft Installer (MSI)

The Flex Terminal Emulator MSI installer named Flex.msi may be run manually by double-clicking and following the prompts. When a Config folder is present in the same location as the MSI file, the contents will be automatically deployed.


Or, to run from a command prompt to perform a silent installation, use a command such as:


msiexec.exe /i "\\ServerName\FlexInstall\Flex.msi" USERCONFIGFOLDER="\\ServerName\FlexInstall\Config" PIDKEY="XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX" /qn


Config Deployment Mechanics

When using one of the above installation methods to installFlex Terminal Emulator  AND "\\ServerName\FlexInstall\Config" exists AND "Personal Documents Directory" is chosen for the User Data Directory location, then:


    1. All files will be mirrored (using robocopy /MIR) from the specified Config folder to C:\ProgramData\FlexSoftware\Flex Terminal Emulator\Config\.

    2. When the Flex Terminal Emulator application is launched by an end user the first time after a new install, the files are copied from C:\ProgramData\FlexSoftware\Flex Terminal Emulator\Config\ to %USERPROFILE%\Documents\FlexSoftware\FlexTerm\. Afterwards, if the user data directory is missing for any reason, the files will be copied again.


Note:  the default robocopy flag "/e" is used to copy all files/folders recursively. This may be overridden by the ROBOCOPYPARAM command line at the initial install in case other advanced options of robocopy is needed. For example, the following will prevent any changes to existing Flex Terminal Emulator configurations from being overwritten, which is essential when performing an upgrade to an existing Flex Terminal Emulator version:

msiexec.exe /i "\\ServerName\FlexInstall\Flex.msi" USERCONFIGFOLDER="\\ServerName\FlexInstall\Config\" PIDKEY="XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX" ROBOCOPYPARAM="/e /xo" /qn

For more information and command line options for robocopy, see the following web page:

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy