Spent a few hours the other day creating a Powershell script that'll do the leg work for new patches and updating your installation for the Non-CE Client.
You can either Create a Scheduled task to run every X days, or make a Shortcut on your desktop to run when required. Alternatively I set this as the startup Program withing Windows RDWeb so that I can update the game and launch it when connecting to the game via a Browser.
IE
Target: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File C:\Scripts\Get-SupremacyUpdate.ps1
You can also run this Passing Variables to the Script itself
IE
.\Get-SupremacyUpdate.ps1 -SupremacyDir "YourInstallFolder" -Force
On first run, it will look for an XML file in the Supremacy Dir that will contain the current patch version, as its not found, it will create that file, pull the latest update and update the XML.
# -------------------------------------------------------- # Script: Get-SupremacyUpdate.ps1 # Author: David Coles # Contributors: # Date: 26/02/2024 13:25:00 # Keywords: Game Updater, Update Scripts, Star Trek Supremacy # Comments: This updates the Star Trek Supremacy Indevelopment game with patch files from URL Repository # -------------------------------------------------------- # .\Get-SupremacyUpdate.ps1 -SupremacyDir YourInstallFolder -Force #Requires -RunAsAdministrator #region Parameters (SupremacyDir, WebURL, UpdaterPath, Force) param( # The folder Supremacy is running from (default is C:\Program Files (x86)\Star Trek - Supremacy) [Parameter(HelpMessage="The folder you are running Supremacy from")][string]$SupremacyDir = "C:\Program Files (x86)\Star Trek - Supremacy Alpha", # The URL to pull the Patch from (default is http://download.supremacy.2pixels.net/downloads/) [Parameter(HelpMessage="The URL to Download Patches")][string]$WebURL = "http://download.supremacy.2pixels.net/downloads/", # The folder to store downloads in temporarily (default is User TEMP) [Parameter(HelpMessage="The folder you want this script to download to temporarily")][string]$UpdaterPath = $env:TEMP, # The folder to Log to (default is Windows User TEMP) [Parameter(HelpMessage="The folder you want to log this script to")][string]$LogDir = $env:TEMP, # Is this a forced reinstall? [Parameter(HelpMessage="Is this a forced reinstall?")][Switch]$Force ) #endregion #region Statics # The filename of the Supremacy download $filenamefilter = "patch_*.zip" # Filename $Filename = "patch_VERSION.zip" # Filename $Foldername = "patch_VERSION" # EXEFilename $EXEName = "SupremacyClient" # Logfilename $Logfile = "$LogDir\Supremacy_update_$(get-date -f yyyy_MM_dd_hh_mm_ss).log" #endregion #region Get-CurrentVersion function setup function Get-CurrentDetails { [CmdletBinding()] param ( [string]$XMLFilePath ) try { $XMLContent = Select-Xml -Path $XMLFilePath -XPath '//Version' $Version = $XMLContent.node.InnerXML } catch { #$XMLFilePath = "c:\temp\Myproject.xml" $XMLSettings = New-Object System.Xml.XmlWriterSettings $XMLSettings.Indent = $true $XMLWriter = [System.XML.XmlWriter]::Create($XMLFilePath, $XMLSettings) $XMLWriter.WriteStartElement("SupremacyUpdater") $XMLWriter.WriteAttributeString("Version", "1.0") $XMLWriter.WriteElementString("Version","00000000") $XMLWriter.WriteEndElement() $XMLWriter.Flush() $XMLWriter.Close() return "00000000" } return $Version } #endregion #region Get-NewVersion function setup function Get-NewVersion { $URLcontent = Invoke-WebRequest $WebURL -UseBasicParsing $URLfilepath = $URLcontent.Links.HREF | Where-Object {$_ -like "*" + $filenamefilter} | Select -First 1 $URLfilename = Split-Path $URLfilepath -leaf $URLversion = $URLfilename -replace "[^0-9]" , '' #Write-Host "URLFile: $URLfilename" return $URLversion } #endregion #region Copy-FileSafer function Setup - Does our File Copying with some checks function Copy-FileSafer { [CmdletBinding()] param ( [string]$path, [string]$destinationfolder ) if (-not (Test-Path -Path $path)) { throw "File not found: $path" } $sourcefile = Split-Path -Path $path -Leaf $destinationfile = Join-Path -Path $destinationfolder -ChildPath $sourcefile try { Copy-Item -Path $path -Destination $destinationfolder -Recurse -Force -ErrorAction Stop } catch { throw "File copy failed" } finally { Write-Information -MessageData "File copied successfully" -InformationAction Continue } } #endregion #region Set-XMLVersion function setup - Allows us to Set the Version Element Function Set-XMLVersion { [CmdletBinding()] param ( [string]$XMLPath, [string]$Node, [string]$NodeValue ) $XMLFile = New-Object XML $XMLFile.Load($XMLPath) $XMLElement = $XMLFile.SelectSingleNode("//$Node") $XMLElement.InnerText = $NodeValue $XMLFile.Save($XMLPath) } #endregion #region MainScript Generated Variables (UpdateNeeded, SupremacyCurrent.array, SupremacyUpdate.array, TodayDate, Filename, FolderName, FileDownloadURL, ZIPFile) Start-Transcript -Path $Logfile -NoClobber [bool]$UpdateNeeded = $false #Get Current Version from XML File $SupremacyCurrent = Get-CurrentDetails -XMLFilePath "$SupremacyDir\Updater.xml" Write-Host "Current Version: $SupremacyCurrent" #Get Newest Version from Website $SupremacyUpdate = Get-NewVersion Write-Host "LatestVersion: $SupremacyUpdate" #Replce 'VERSION' in File/foldernames with updated version $Filename = $Filename -replace "VERSION",$SupremacyUpdate $Foldername = $Foldername -replace "VERSION",$SupremacyUpdate Write-Host "New Filename: $Filename" #Construct URL File to Download $FileDownloadURL = $WebURL+$Filename Write-Host ("Updated Download URL: $FileDownloadURL") #Construct Zip File $ZIPfile = "$UpdaterPath\$Filename" Write-Host ("Download FilePath: $ZIPfile") #Compare current version to latest version, define $UpdateNeeded if ($SupremacyCurrent -ne $SupremacyUpdate) { $UpdateNeeded = $true } $ProcessRunning = Get-Process -Name $EXEName -EA SilentlyContinue if ($ProcessRunning -eq $null){ if ($UpdateNeeded -or $Force -and -not $UpdateError){ #Update is needed, continue #Notify of version change and update Write-Host ("There is an update pending. Current: " + $SupremacyCurrent + ", Latest: "+$SupremacyUpdate) New-Item -Path $UpdaterPath -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null #Download Latest Version to Temp Write-Host Dowloading latest release Set-Location -Path $UpdaterPath $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest $FileDownloadURL -Outfile $ZIPfile -UseBasicParsing Write-Host Installing updated version $ProgressPreference = 'Continue' #Extract Files and Overwrite Write-Host "Extracting Files..." Expand-Archive -Path $ZIPfile -DestinationPath $UpdaterPath -Force Write-Host "Files Extracted" #Unblock EXE Unblock-File "$UpdaterPath\$Foldername\$EXEName.exe" Write-Host "Unlocked $EXEName" #Copy Files from Temp to $SupremacyDir Write-Host "Copying Files..." Copy-FileSafer -Path "$UpdaterPath\$Foldername\*" -Destination $SupremacyDir #Update Version XML File in Supremacy Directory Set-XMLVersion -XMLPath "$SupremacyDir\Updater.xml" -Node "Version" -NodeValue $SupremacyUpdate Write-Host "Supremacy has been updated to $SupremacyUpdate" #Clean Up Temp Files Write-Host Cleaning up Remove-Item $ZIPfile -Force Remove-Item "$UpdaterPath\$Foldername" -Recurse -Force } else{ #Version is Current - Update not Needed Write-Host ("You have the latest version of Supremacy installed - $SupremacyCurrent. Update not required.") } } else{ #Update Available but Client is running Write-Host ("Update Available for Supremacy but Supremacy Client is running, please close the game and try again") } Stop-Transcript exit $LASTEXITCODE #endregion