Go Back

Can a synergy version upgrade be scripted ?

I have approx. 30 windows servers and PCs which all need to be upgraded out of hours to upgrade from synergy 10.3.1 to 10.3.3b

These are running 64 bit synergy, which means upgrading the 32 bit and 64 bit versions

If I click and run the .exe it comes with an install shield dialogue

Is it possible to run the installation from a BAT file without requiring any user input ?

Or does someone have to connect to each server and PC and manually click and run the 2 installers and click the NEXT buttons ?
 

5 Answers
1   | Posted by Gordon Ireland to Installation on 3/29/2017 4:10 PM
Ace Olszowka
Hey Gordon!

I've scripted out a bit of this for our use internally; there is nothing special about this code so I've repo'ed it below. I use this code all the time so I KNOW it works. Right now this script is set to do 10.3.1b but the process is identical. You will have to extract the "real" MSI out of the InstallShield installer (that is until Synergex switches over to a "pure MSI"). This can be done by running the installer on one of the boxes and then copying the bits out of C:\Users\USERNAME\AppData\Local\Temp\Synergex the folders are as follows:
  • SDE - The Synergy Runtime (probably the one you want)
  • SDE64 - 64bit Synergy Runtime (probably the other one you want)
  • SDI - The Visual Studio Integration Tools
  • NN - The xfNetLink Installer
 
@ECHO off
REM // <summary>
REM //    Handle the Install Process of Synergy. The only assumption
REM //  is that user is an Administrator and that the Installer is located
REM //  at the specified location.
REM // </summary>
GOTO :Main

REM // <summary>
REM // The Main entry point of this script.
REM // </summary>
:Main
  REM // Variables
  SET SYNERGY_X64_MSI_INSTALLER=%CD%\MasterFiles\Installers\104SDE1031B\104SDE1031B.msi
  SET SYNERGY_X86_MSI_INSTALLER=%CD%\MasterFiles\Installers\101SDE1031B\101SDE1031B.msi

  SET SYNERGY_LICENSE_SERVER=SET_TO_LICENSE_SERVER

  REM // The Synergy Installers Expose the Following Features:
  REM //   CC - Core Components
  REM //        + Includes License Manager, Synergy Runtime, and other
  REM //          components necessary to run typical Synergy applications.
  REM //          (It must beinstalled on your system.)
  REM //   CN - Connectivity Series
  REM //        + Includes xfODBC and SQL Connection.
  REM //   EG - Examples
  REM //        + Includes examples for Synergy/DE products.
  REM //   PS - Professional Series Development Environment
  REM //        + Includes Synergy DBL, Synergy DBMS, UI Toolkit, Repository
  REM //          and ReportWriter.
  REM //   RW - ReportWriter
  REM //        + Includes ReportWriter and the ReportWriter runtime.
  REM //   SC - Files for shared installation
  REM //        + Includes the files that will enable you to install
  REM //          Synergy/DE Client on client machines to access a shared
  REM //          Synergy/DE installation on this server machine.
  REM //   WB - Professional Series Workbench
  REM //        + (SDE101) Installs Workbench
  REM //   XS - xfSeries
  REM //        + Includes xfServer and xfServerPlus.
  REM //
  REM // These features should be Comma Separated
  SET SYNERGY_X64_FEATURES_TO_INSTALL=CC,CN,XS
  SET SYNERGY_X86_FEATURES_TO_INSTALL=CC,CN,XS

  REM // At some point we should figure out how to extract the MSI from
  REM // the InstallShield Compressed Version. For now rely on us manually
  REM // extracting the MSI.

  REM // Run the Installer Silently using MSIEXEC, the START /WAIT is to
  REM // allow us to get an ERRORLEVEL out of this process as per this blog
  REM // http://blogs.msdn.com/b/heaths/archive/2005/11/15/493236.aspx

  ECHO ********************************************************************
  ECHO * Installing Synergy                                               *
  ECHO ********************************************************************
  ECHO.

  REM // x64 First
  ECHO [1/2] Installing Synergy x64 From %SYNERGY_X64_MSI_INSTALLER% with Features "%SYNERGY_X64_FEATURES_TO_INSTALL%" Using License server %SYNERGY_LICENSE_SERVER%
  START /WAIT MSIEXEC /i "%SYNERGY_X64_MSI_INSTALLER%" /qn LICENSETYPE=Client SERVERNAME=%SYNERGY_LICENSE_SERVER% ADDLOCAL=%SYNERGY_X64_FEATURES_TO_INSTALL%
  REM // ERRORLEVEL 3010 means a reboot is needed, treat this as Success
  IF %ERRORLEVEL% NEQ 0 (IF %ERRORLEVEL% NEQ 3010 ( GOTO :ERROR_AND_EXIT ) )

  REM // x86 Last
  ECHO [2/2] Installing Synergy x86 FROM %SYNERGY_X86_MSI_INSTALLER% with Features "%SYNERGY_X86_FEATURES_TO_INSTALL%" Using License server %SYNERGY_LICENSE_SERVER%
  START /WAIT MSIEXEC /i "%SYNERGY_X86_MSI_INSTALLER%" /qn LICENSETYPE=Client SERVERNAME=%SYNERGY_LICENSE_SERVER% ADDLOCAL=%SYNERGY_X86_FEATURES_TO_INSTALL%
  REM // ERRORLEVEL 3010 means a reboot is needed, treat this as Success
  IF %ERRORLEVEL% NEQ 0 (IF %ERRORLEVEL% NEQ 3010 ( GOTO :ERROR_AND_EXIT ) )

  REM // End of Main
  ECHO Successfully Completed The Synergy Installation
GOTO :EOF

REM // <summary>
REM // Function that displays an Error Message and Ends Script Execution.
REM // </summary>
:ERROR_AND_EXIT
  ECHO An unexpected error was encountered (%ERRORLEVEL%), Exiting the process
  EXIT /B 1
GOTO :EOF

Let me know if you need more help!

For installing Remotely you might want to take a look into PowerShell for the following features:
  • PowerShell Remote Execute (Then you could use something similar to the above batch file) this would be the "old school" way to do it
  • PowerShell Desired State Configuration (DSC) this is something I tried to roll out internally but have not gotten working as desired, but they do have a task that understands MSI files, once you extract the goodies from the InstallShield installer you should be able to use that task

If you really need I might be able to dig up my Powershell DSC project, I can't seem to find it right now but I NEVER throw anything away!

 

3/29/2017 6:57 PM   1  
Gordon Ireland
Thanks Ace!

3/30/2017 4:20 PM   0  
Marty Lewis

Thanks for the awesome post, Ace!

I'd just like to add that recent builds of SDI now have feature selection, as well. We expose Dev12, Dev14 and Dev15 as features which are the internal names for Visual Studio 2013, Visual Studio 2015 and Visual Studio 2017, respectively. Each feature will be disabled if the corresponding VS version does not exist on the machine.

If you do not specify features, you will get integration installed for every supported version of Visual Studio on the machine.


3/30/2017 5:01 PM   0  
Carl Wysocki
Nicely done, Ace! We might consider that as well, since we've automated so much already.

3/31/2017 3:32 PM   1  
Gordon Ireland
Thanks Ace !

 

3/31/2017 3:34 PM   0  
Please log in to comment or answer this question.