Installing a WebOffice Patch Automatically
This script (Install_WebOffice_Patch.bat) installs a WebOffice patch automatically: into the WebOffice applications on Apache Tomcat and - if new - the WebOffice SOE and the WebOfficeSystem files on ArcGIS Server.
The script only installs patches within the installed version - it does not upgrade to a new major version. A patch always fits exactly one WebOffice version (for example 10.9 R5); the script checks this before making any change.
Before making any change, the script checks all prerequisites (signature of the patch file, versions of the applications and of the SOE, free disk space, login to ArcGIS Server). Only then does it back up the applications, briefly stop Apache Tomcat, install the patch and start Apache Tomcat again. The script then checks whether every WebOffice application answers again - if not, it automatically restores the affected applications from the backup.
|
This script automates the manual steps described in the chapter Upgrade Steps of WebOffice. Applications that are not located in the webapps folder but are referenced from another folder via a context file (conf\Catalina\localhost\<application>.xml) are detected by the script and patched there. |
Prerequisites:
•WebOffice 10.9 R3 or newer. Older versions are still patched by hand.
•The script must be run with administrator rights (it will prompt for these itself if needed).
•For the SOE, an administrator account of ArcGIS Server. The password is asked for in a dialog and never written into the script file.
•The patch - either downloaded automatically (setting DOWNLOAD_LATEST_PATCH=YES, requires access to https://resources.weboffice.vertigis.com) or copied into the script folder by hand: as ZIP file (WebOffice109R5_Patch_YYYYMMDD.zip) or extracted. This way the script also works on servers without internet access.
|
Recommendation: Create a snapshot or backup of the server before a real run, as with any software update on a production system. |
Setup:
Open Install_WebOffice_Patch.bat in a text editor and adapt the CONFIGURATION section to your server. Then set SETTINGS_ADAPTED=YES - the script does not run with the unchanged template.
Setting |
Meaning |
|---|---|
INSTALL_MODE |
ALL (WebOffice applications and SOE on this server), WEBOFFICE (applications only) or ARCGIS (SOE only). If Apache Tomcat and ArcGIS Server run on different servers, run the script on both right after each other. |
WEBOFFICE_VERSION |
Installed version, for example 10.9R5. |
DOWNLOAD_LATEST_PATCH |
YES: download and check the newest patch automatically. NO: use the patch files (or the ZIP file) in the script folder. |
APACHE_TOMCAT_FOLDER, APACHE_TOMCAT_SERVICE_NAME |
Installation folder and service name (not the display name) of Apache Tomcat. |
WEBOFFICE_APPS |
The applications to be patched, separated by ; (name as in the URL). |
REINSTALL_SAME_PATCH |
NO (default): applications that already have exactly this patch are skipped. |
WEBOFFICE_SERVER_URL |
URL of Apache Tomcat for the check after the patch, for example http://localhost:8080. |
ARCGIS_SERVER_URL, ARCGIS_SERVER_USERNAME, SYNOUTPUTSERVICES, WEBOFFICESYSTEM_FOLDER |
ArcGIS Server, administrator, SynOutputService services and WebOfficeSystem folder. |
CREATE_BACKUP, BACKUP_FOLDER |
Backup of the applications before the patch - required for the automatic restore. |
Usage:
1.Always start with the parameter /dryrun first. This mode runs all checks but changes nothing on Apache Tomcat, ArcGIS Server and the applications.
2.Read the result carefully, especially all WARN lines.
3.Only then start the script without /dryrun. After the checks it waits for a key press before it changes anything.
|
Do not click into the console window while the script is running. A click starts the Windows text selection mode and pauses the script (the window title then begins with "Select..."). Press Esc to continue. |
Available parameters:
Parameter |
Meaning |
|---|---|
/dryrun |
Checks only, nothing is changed. Always use this first. |
/unattended |
For the Windows Task Scheduler: no dialogs, no key press. For ArcGIS Server, the password must have been saved before in an interactive run under the same Windows account (check box "Remember the password on this server" in the login dialog). |
Instead of /dryrun and /unattended, -DryRun and -Unattended are accepted as well. Any other parameter stops the script at once without changing anything.
Without internet access:
If the server cannot reach the download page, the script states the cause (for example firewall, proxy, certificate) and the steps needed: download the patch on a PC with internet access, copy the ZIP file into the script folder and set DOWNLOAD_LATEST_PATCH=NO.
Automatic restore:
If the patch of an application fails or the application does not answer afterwards (waiting time up to 10 minutes), the script restores this application from the backup and starts Apache Tomcat again. The WebOffice SOE and WebOfficeSystem are not restored; the log names the backup and the manual steps.
Log:
Every run writes a log file into the Logs subfolder of the script. At the end, the window title shows the result (FINISHED OK or FAILED); on errors the log file opens automatically.
Disclaimer:
This script is an automated technical aid, not a guarantee. VertiGIS accepts no liability for the outcome of running this script or for decisions based on it. Reviewing the result and deciding whether to proceed is the responsibility of the server administrator.
Download:
The current version of the script is available at the following link: Install_WebOffice_Patch.zip. This link stays the same for future versions. The script is also included on the WebOffice DVD under Software\Miscellaneous\Automatization\Install_WebOffice_Patch.
|
Regularly updating WebOffice is the foundation of secure operation. For further measures, see the chapter Securing WebOffice — Recommendations for Production Use. |