Evergreen Script – Update your Software, the lazy way

Why the whole thing ?

The whole thing came about because I got tired of installing and updating Microsoft Teams Machine-Based at customers. Another point that drove me in this matter was that I had come to customers and in their Golden Image the most important (and simplest) things were not taken into account.

For example:

  • Disabling the auto update of the software (Adobe Reader, Microsoft Edge, Google Chrome, etc.)
  • Wrong installers or missing parameters during installation (user-based install for Microsoft OneDrive, Slack or Microsoft Teams)
  • Missing customizations after installation (reg hacks or customizations to files at Microsoft FSLogix or Microsoft Teams)
  • Search for current versions on obscure pages (Cisco Webex)

Exactly this is where I wanted to remedy with the Evergreen Script.

  • No more searching for the current version on the confusing manufacturer pages.
  • Comparison of the installed version, with the current one from the Internet
  • Automatic download of the current version (and for some software, even the current ADMX files)
  • Uninstalling (if necessary) the software and installing (with the correct parameters) the current new version
  • Adjustment of the scheduled tasks and services, so that no automatic updates can interfere with them
  • Adaptation of the new software to the specifics of the operating system (e.g. addition of the Scheduled Task for Windows Server 2019 and newer when installing Microsoft FSLogix for the “Event ID 2 wsearch” bug)

The Evergreen Script

Download Version 2.06

Important!
Since version 1.41, the Evergreen script automatically detects if there is a new version. If there is a new version, when the GUI is started, the user is asked if he wants to update the script.

Evergreen Script Auto Update Pop Up


When starting with the -File & -GUIfile parameter, this is done automatically and then the new script version is started again with the configuration file.

Evergreen Script Auto Update

GUI method

Download the Evergreen script from GitHub and run it in an administrative PowerShell console.

Important!
The Evergreen script can be accessed and started both locally and from a UNC path.

Administrative PowerShell Console

The script is started by default with LastSetting.txt stored in the same folder. If you want to start the GUI with another file, use the -GUIfile parameter.

Administrative PowerShell Console GUIfile Parameter

The GUI of the Evergreen script appears with the selectable software on the General page.

Evergreen Script GUI General Page

Via the Select Mode options arranged above, the following can be defined.

  • If the selected software is to be downloaded only
  • If the selected software is to be installed (if the installation files have already been downloaded in advance via Evergreen Script)
  • If the software is to be downloaded first and then installed

Splitting the functions related to downloading and installing is often used when the target computer does not have an Internet connection.

Evergreen Script Select Mode Download Install

Global settings for the selected software can be set via the options Select Language, Select Architecture and Select Installer Type. Of course, this is only taken into effect if the program makes this selection available during download or installation.

The settings regarding language (Select Language), architecture (Select Architecture) and installer type (Select Installer Type) can be adjusted individually for each software on the detail page. The settings on the detail page overwrite the global settings for the software.

Under Select Installer Type, a differentiation is made between User Based (Laptop, Static Citrix Worker, etc.) and Machine Based (Random Citrix Worker, RDS Host).

Evergreen Script GUI Select Language Select Architecture Select Installer Type

For some software further selectable options are available, like the update channel / ring or the license version.

Evergreen Script GUI Select Software

All settings are saved locally in the LastSetting.txt file when you click on Save or Start and are automatically read from there the next time you start the program. By clicking on Save, the LastSetting.txt is created without starting an installation.

Evergreen Script GUI Select All

On the Detail page, the software selected under General is also already selected. If something is changed to the selected software on the Detail page, this is also transferred.

Evergreen Script GUI Detail Page

The global settings regarding language (Select Language), architecture (Select Architecture) and installer type (Select Installer Type) can be adjusted individually for each software on the detail page. This overwrites the global setting for this software.

Additionally, Microsoft Visio and Microsoft Project can be selected. If this is the case, the install.xml for Microsoft 365 Apps or Microsoft Office is extended with the selected options.

Evergreen Script GUI Detail Page Select Software

Four optional modes are available on the detail page:

Evergreen Script GUI Detail Page Optional Mode
  • WhatIf Mode: If this is active, the set activities are simulated. No installers are downloaded or installed. You can only see in the output if there is newer software.

    The only activity the script performs is the creation of the FW log and the install log.
Evergreen Script WhatIf Mode Download

A message is displayed that you are in WhatIf mode.

Evergreen Script WhatIf Mode Install
  • Installer Repository Mode: In Installer Repository Mode, the installers of the selected software are copied to the folder _Repository before the new download.
Evergreen Script Installer Repository Mode
  • Installer CleanUp Mode: In Installer CleanUp Mode, the installers of the selected software are deleted after installation. This can be used on Golden Image servers to keep it clean.
Evergreen Script CleanUp Mode
  • Start Menu CleanUp Mode: In Start Menu CleanUp Mode, the start menu entries of the installed software are deleted after installation. This can be used on Golden Image servers to keep the start menu clean.

In addition, you can select your own XML file under Custom Microsoft 365 Apps or Microsoft Office XML File and this will then be copied (overwrites any install.xml). The process for copying and renaming is triggered via Save and Start.

Evergreen Script Custom Microsoft 365 Apps XML File

Important!
When this is used, the options set via Evergreen Script (Add Visio / Project, Language, Architecture) are not applied.

Unattended method

If the Evergreen Script is to be started via a scheduled task or third-party software, this can be preconfigured via parameters.

Download the script and run it in an Administrative PowerShell Console.

Evergreen Script -File unattended Mode

With the parameter -File the GUI is not started to define the settings, but the passed configuration file is read, which was created before via the GUI method (LastSetting.txt).

-File Parameter Evergreen Script

The file does not have to be named LastSetting.txt, but is created by the script and can be adapted to the needs.

XML Setting files

LastSetting.txt

To create a LastSetting.txt GUI-based, simply run the Evergreen script without parameters and select your settings and software in the GUI.

Evergreen Script GUI

Click on Save and then cancel the script via Cancel. You can use the LastSetting.txt file created in the Evergreen Script folder for your parameter start.

At the moment the file consists of 170 lines with few characters (mostly 1 or 0).

Evergreen Script LastSetting.txt

Of course, you can also build the file manually. Here is a short explanation of the individual lines (settings).

Background information

For each selected and downloaded software, a new folder is created under the Evergreen Script folder. A version file is created in this folder when downloading and a log file is created when installing.

During the download run, the version available on the Internet is compared with the local version, from the version file. If a newer version is available, the local installation files and the version file are deleted and the new software is downloaded and a new version file is created.

Before downloading the completed software, the download link is placed in the firewall log under _Install Logs.

Purpose / Change:

Example

.\Evergreen.ps1 -file Download.txt

Loads the configuration from the Download.txt file and processes this.

Evergreen Script -File Parameter

.\Evergreen.ps1 -GUIfile Download.txt

Start the GUI with the options out of the Download.txt file.

Evergreen Script -GUIfile Parameter

.\Evergreen.ps1

Starts the GUI to select the mode (Install and/or Download) and the software (Release, Update Ring, Language, etc.).

Evergreen Script GUI

Notes

Evergreen PowerShell Module

If Download is selected, the module is checked each time the script is executed, installed or updated if a new version is available.

Nevergreen PowerShell Module

If Download is selected, the module is checked each time the script is executed, installed or updated if a new version is available.

VcRedist PowerShell Module

If Download is selected, the module is checked each time the script is executed, installed or updated if a new version is available.

1Password

Installation arguments:

7 Zip

These architectures are selectable:

Installation arguments:

Adobe Pro DC

These architectures are selectable:

Installation arguments:

After the update, the Adobe service and scheduled tasks will be stopped and disabled.

Adobe Reader DC

These architectures are selectable:

The following languages are selectable:

Installation arguments:

After installation, the Adobe service and scheduled tasks are stopped and disabled.

Autodesk DWG TrueView

Unpacking the installer:

Installation arguments:

BIS-F

Installation arguments:

After the installation, the scripts will be adjusted regarding task offload, RSS activation and DEP deactivation.

The BIS-F admx and adml files are stored in the ADMX folder.

Cisco Webex Teams

Installation options:

These architectures are selectable:

Installation arguments:

Citrix Files

Installation arguments:

Citrix Hypervisor Tools

These architectures are selectable:

Installation arguments::

Citrix WorkspaceApp

Installation options:

Before installing the new receiver, the old receiver is uninstalled using the Receiver CleanUp Tool.

Installation arguments:

After the installation, various registry keys are set.

As always, after installing the new Workspace App, the system should be rebooted.

ControlUp Agent

Installation options:

Installation options:

These architectures are selectable:

Installation arguments:

deviceTRUST

Installation options:

These architectures are selectable:

Installation arguments:

The deviceTrust admx and adml files are stored in the ADMX folder.

Filezilla

Installation arguments:

Foxit PDF Editor

The following languages are selectable:

Installation arguments:

Foxit Reader

The following languages are selectable:

Installation arguments:

GIMP

Installation arguments:

Git for Windows

These architectures are selectable:

Installation arguments:

Google Chrome

Installation options:

These architectures are selectable:

Installation arguments:

After installation, Chrome services and scheduled tasks will be stopped and disabled.

The Google Chrome admx and adml files are stored in the ADMX folder.

Greenshot

Installation arguments:

ImageGlass

These architectures are selectable:

Installation arguments:

IrfanView

These architectures are selectable:

The following languages are selectable:

Installation arguments:

KeePass

The following languages are selectable:

Installation arguments:

LogMeIn GoToMeeting

Installation arguments:

Microsoft .Net Framework

Installation options:

These architectures are selectable:

Installation arguments:

Microsoft 365 Apps

Installation options:

These architectures are selectable:

The following languages are selectable:

The download not only downloads setup.exe, but also creates the following xml files if they are not already in the folder:

remove.xml

install.xml

Afterward, the install.xml is used during the Install phase to download the required installation files.

Before installing the new Microsoft 365 Apps version, the previous Office installation is removed (remove.xml).

After that, the reinstallation of the software (install.xml) begins.

An install.xml with the specifics of your own installation can be stored and used in advance (e.g. languages, app exclusion or inclusion (Visio & Project)).

By default, the selected one is defined in the install.xml (here 64Bit / Match OS Language / Semi Annual Channel):

Microsoft AVD Remote Desktop

Installation options:

These architectures are selectable:

Installation arguments:

Microsoft Azure CLI

Installation arguments:

Microsoft Azure Data Studio

Installation options:

These architectures are selectable:

Installation arguments:

Microsoft Edge

Installation options:

These architectures are selectable:

Installation arguments:

After the installation, the auto update scheduled tasks of Microsoft Edge are disabled and the Citrix API Hooks are set in the registry.

Microsoft Edge WebView2

These architectures are selectable:

Installation arguments:

Microsoft FSLogix

During the FSLogix installation, the old installation, if present, is first uninstalled and a restart is requested.

After that, the script must be started again so that the new version is installed cleanly.

Installation options:

These architectures are selectable:

Installation arguments:

The Microsoft FSLogix admx and adml files are stored in the ADMX folder.

Not only the FSLogix Agent is installed, but also the FSLogix AppRule Editor.

After the installation the following tasks are still done (For Windows Server 2019, Server 2021 and Windows 10 Enterprise for Virtual Desktops):

  • Deactivate FSLogix RoamSearch
  • Deactivate FSLogix GroupPolicy
  • Add Schedulded Task “Restart Windows Search Service on Event ID 2”

Microsoft Office

Installation options:

These architectures are selectable:

The following languages are selectable:

The download not only downloads setup.exe, but also creates the following xml files if they are not already in the folder:

remove.xml

install.xml

After that, the install.xml is used during the Install phase to download the required installation files.

Before installing the new Microsoft Office 2019 version, the previous Office installation is removed (remove.xml).

After that, the reinstallation of the software (install.xml) begins.