From c92fad6edf0002377bcb74578dcc1bc55aff406f Mon Sep 17 00:00:00 2001 From: KammM Date: Sun, 24 Nov 2024 20:13:15 +0100 Subject: [PATCH] Update-Firefox: Renamed to Update-MozillaSoftware; Can Update Firefox and Thunderbird now! --- .../Update-Firefox_Settings.ini | 47 ---- .../Update-MozillaSoftware.ps1} | 222 +++++++++++++----- .../Update-MozillaSoftware_Caller.cmd} | 0 .../Update-MozillaSoftware_History.txt} | 8 + .../Update-MozillaSoftware_Settings.ini | 95 ++++++++ ...-MozillaSoftware_WindowsTaskScheduler.xml} | Bin 3596 -> 3618 bytes 6 files changed, 269 insertions(+), 103 deletions(-) delete mode 100644 current/Update-Firefox/Update-Firefox_Settings.ini rename current/{Update-Firefox/Update-Firefox.ps1 => Update-MozillaSoftware/Update-MozillaSoftware.ps1} (77%) rename current/{Update-Firefox/Update-Firefox_Caller.cmd => Update-MozillaSoftware/Update-MozillaSoftware_Caller.cmd} (100%) rename current/{Update-Firefox/Update-Firefox_History.txt => Update-MozillaSoftware/Update-MozillaSoftware_History.txt} (65%) create mode 100644 current/Update-MozillaSoftware/Update-MozillaSoftware_Settings.ini rename current/{Update-Firefox/Update-Firefox_WindowsTaskScheduler.xml => Update-MozillaSoftware/Update-MozillaSoftware_WindowsTaskScheduler.xml} (89%) diff --git a/current/Update-Firefox/Update-Firefox_Settings.ini b/current/Update-Firefox/Update-Firefox_Settings.ini deleted file mode 100644 index e946a54..0000000 --- a/current/Update-Firefox/Update-Firefox_Settings.ini +++ /dev/null @@ -1,47 +0,0 @@ -#################################################################################################### -# Digital Data Configuration File (Template Date: 30.07.2016) # -# UTF-8 Coding required! # -# incl. FailSafe functions that are active when information is missing. # -#################################################################################################### - -#==================================================================================================# -########################################## General Setup ########################################### -#==================================================================================================# - -#################################################################################################### -# Path in which the log files will be stored. # -# Example: E:\LogFiles\ # -# FailSafe Setting is: \Logs # -#################################################################################################### -LogPath = - -#################################################################################################### -# Numerical value how long (in days) log files will be kept. ValidateRange is 0 - 1000 # -# Setting the Value to 0 disables this Function. # -# FailSafe Setting is: 60 # -#################################################################################################### -LogFileKeepTime = 30 - -#==================================================================================================# -########################################## Profile Setup ########################################### -#==================================================================================================# - -#################################################################################################### -# VersionURL # -# Set the URL with the info about current version distibution. # -# Result file should be JSON # -#################################################################################################### -VersionURL = https://product-details.mozilla.org/1.0/firefox_versions.json - -#################################################################################################### -# DownloadURL # -# Set the URL where to download the new software version. # -# Use "%NewFirefoxVersion%" as placeholder for the new version number, got from the VersionURL. # -#################################################################################################### -DownloadURL = https://download-installer.cdn.mozilla.net/pub/firefox/releases/%NewFirefoxVersion%/win64/de/Firefox%20Setup%20%NewFirefoxVersion%.msi - -#################################################################################################### -# InstallPath # -# Set the local installation path. # -#################################################################################################### -InstallPath = D:\ProgramFiles\Mozilla Firefox \ No newline at end of file diff --git a/current/Update-Firefox/Update-Firefox.ps1 b/current/Update-MozillaSoftware/Update-MozillaSoftware.ps1 similarity index 77% rename from current/Update-Firefox/Update-Firefox.ps1 rename to current/Update-MozillaSoftware/Update-MozillaSoftware.ps1 index 10f69db..5717d99 100644 --- a/current/Update-Firefox/Update-Firefox.ps1 +++ b/current/Update-MozillaSoftware/Update-MozillaSoftware.ps1 @@ -1,6 +1,6 @@ -# Update-Firefox +# Update-MozillaSoftware # ---------------------------------------------------------------------------- -# This Script installs the newest Firefox version +# This Script installs the newest Firefox and/or Thunderbird versions # # Returns: - # ---------------------------------------------------------------------------- @@ -10,8 +10,8 @@ # Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works # ---------------------------------------------------------------------------- # Creation Date / Author: 04.11.2024 / MK -# Version Date / Editor: 23.11.2024 / MK -# Version Number: 1.1.0.0 +# Version Date / Editor: 24.11.2024 / MK +# Version Number: 1.2.0.0 #Requires –Version 4.0 @@ -49,11 +49,8 @@ Set-Variable -Scope Global -Name ModuleDefaultSourcePath -Value "P:\Sk Set-Variable -Scope Global -Name ModuleHKLMRegistryPath -Value "HKLM:\SOFTWARE\Digital Data\Modules" Set-Variable -Scope Global -Name ModuleHKCURegistryPath -Value "HKCU:\SOFTWARE\Digital Data\Modules" -Set-Variable -Scope Global -Name VersionURL -Value "https://product-details.mozilla.org/1.0/firefox_versions.json" -Set-Variable -Scope Global -Name DownloadURL -Value "https://download-installer.cdn.mozilla.net/pub/firefox/releases/%NewFirefoxVersion%/win64/de/Firefox%20Setup%20%NewFirefoxVersion%.msi" -Set-Variable -Scope Global -Name InstallPath -Value "D:\ProgramFiles\Mozilla Firefox" -Set-Variable -Scope Global -Name CurrentFirefoxVersion -Value 0 -Set-Variable -Scope Global -Name NewFirefoxVersion -Value 0 +Set-Variable -Scope Global -Name Firefox -Value $NULL +Set-Variable -Scope Global -Name Thunderbird -Value $NULL #-----------------------------------------------------------------------------------------------------# ############################################ set functions ############################################ @@ -628,18 +625,37 @@ Function Import-CustomModule { } #end process } #end function -Function Get-CurrentFirefoxVersion { - Try { - $CurrentFirefoxVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Mozilla\Mozilla Firefox" -Name "(default)" -ErrorAction Stop)."(default)" - Write-Logfile -LogLine "Currently installed Firefox Version: $CurrentFirefoxVersion" - Return $CurrentFirefoxVersion - } Catch { - Write-Logfile -LogLine "Firefox seems not to be installed!" - Return 0 - } #end try/catch +Function Get-CurrentVersion { + Param ($MozillaSoftware) + + # Check if MozillaSoftware parameter is provided + If (-not $MozillaSoftware) { + Write-Logfile -LogLine "No Mozilla software specified!" + Return [Version]::0 + } + Try { + $CurrentMozillaSoftwareVersionRegPath = "HKLM:\SOFTWARE\Mozilla\Mozilla $MozillaSoftware" + Write-Logfile -LogLine "Checking registry path: $CurrentMozillaSoftwareVersionRegPath" + + # Check if the registry path exists + If (Test-Path -Path $CurrentMozillaSoftwareVersionRegPath) { + $CurrentMozillaSoftwareVersion = (Get-ItemProperty -Path $CurrentMozillaSoftwareVersionRegPath -Name "(default)" -ErrorAction Stop)."(default)" + Write-Logfile -LogLine "Currently installed $MozillaSoftware Version: $CurrentMozillaSoftwareVersion" + Return [Version]$CurrentMozillaSoftwareVersion + } Else { + Write-Logfile -LogLine "Registry path for $MozillaSoftware not found!" + Return [Version]::0 + } + } Catch { + Write-Logfile -LogLine "Error retrieving version for $MozillaSoftware`: $_" + Return [Version]::0 + } } #end function -Function Get-NewFirefoxVersion { + +Function Get-NewVersion { + Param ($MozillaSoftware, $VersionURL) + Try { $WebRequestResult = Invoke-WebRequest -Uri $VersionURL -ErrorAction Stop @@ -648,13 +664,14 @@ Function Get-NewFirefoxVersion { $RestMethodResult = Invoke-RestMethod -Uri $VersionURL -ErrorAction Stop Write-Logfile -LogLine "Software Version on server retrived!" + $VersionAttribut = "LATEST_$MozillaSoftware`_VERSION" - IF ($RestMethodResult.LATEST_FIREFOX_VERSION -gt "0" ) { - [version]$NewFirefoxVersion = $($RestMethodResult.LATEST_FIREFOX_VERSION) - Write-Logfile -LogLine "Latest Firefox Version: $NewFirefoxVersion" - Return $NewFirefoxVersion.ToString() + IF ($($RestMethodResult.$VersionAttribut) -gt "0" ) { + [version]$NewVersion = $($RestMethodResult.$VersionAttribut) + Write-Logfile -LogLine "Latest Version: $NewVersion" + Return $NewVersion.ToString() } else { - Write-Logfile -LogLine "Could not find the Firefox version number on the release notes page." + Write-Logfile -LogLine "Could not find the $MozillaSoftware version number from JSON interface." Return 0 } #end if/else @@ -672,26 +689,28 @@ Function Get-NewFirefoxVersion { } #end try/catch } #end function -Function Update-NewFirefoxVersion { - Param ($NewFirefoxVersion, $DownloadURL) +Function Install-NewVersion { + Param ($MozillaSoftware, $NewVersion, $DownloadURL, $InstallPath) Try { - # Define the URL for the latest Firefox installer - $NewFirefoxVersionURL = $DownloadURL -replace("%NewFirefoxVersion%",$NewFirefoxVersion) - $NewFirefoxVersionSetup = "$env:TEMP\Firefox$NewFirefoxVersion.msi" + # Define the URL for the latest installer + $NewVersionURL = $DownloadURL -replace("%NewVersion%",$NewVersion) + $NewVersionSetup = "$env:TEMP\$MozillaSoftware$NewVersion.msi" # Use Invoke-WebRequest to download the installer - Write-Logfile -LogLine "Downloading Firefox Version $NewFirefoxVersion..." - Invoke-WebRequest -Uri $NewFirefoxVersionURL -OutFile $NewFirefoxVersionSetup -ErrorAction Stop + Write-Logfile -LogLine "Downloading $MozillaSoftware Version $NewVersion from: " + Write-Logfile -LogLine $NewVersionURL + Invoke-WebRequest -Uri $NewVersionURL -OutFile $NewVersionSetup -ErrorAction Stop - IF (Test-Path -Path $NewFirefoxVersionSetup -PathType Leaf -ErrorAction SilentlyContinue) { + IF (Test-Path -Path $NewVersionSetup -PathType Leaf -ErrorAction SilentlyContinue) { - $FirefoxProcess = Get-Process -Name "firefox" -ErrorAction SilentlyContinue - If ($FirefoxProcess) {Stop-Process -Name "firefox" -Force -ErrorAction Stop} + $MozillaSoftwareProcess = Get-Process -Name $MozillaSoftware -ErrorAction SilentlyContinue + If ($MozillaSoftwareProcess) {Stop-Process -Name $MozillaSoftware -Force -ErrorAction Stop} - Write-Logfile -LogLine "Installing Firefox Version $NewFirefoxVersion, please wait..." - $ArgumentList = "/i $NewFirefoxVersionSetup INSTALL_DIRECTORY_PATH=""$InstallPath"" /quiet" + Write-Logfile -LogLine "Installing $MozillaSoftware Version $NewVersion, please wait..." + $ArgumentList = "/i $NewVersionSetup INSTALL_DIRECTORY_PATH=""$InstallPath"" /quiet" Start-Process -Verb runAs -FilePath "msiexec.exe" -ArgumentList $ArgumentList -Wait -ErrorAction Stop + Write-Logfile -LogLine "Install or Update is completed!" } Else { Write-Logfile -LogLine "Cannot find setup file!" @@ -703,7 +722,7 @@ Function Update-NewFirefoxVersion { } Finally { Write-Logfile -LogLine "Cleaning Up!" - Remove-Item "$env:TEMP\Firefox$NewFirefoxVersion.msi" -Force -ErrorAction SilentlyContinue + Remove-Item "$env:TEMP\$MozillaSoftware$NewVersion.msi" -Force -ErrorAction SilentlyContinue } #end try/catch/finally @@ -740,9 +759,39 @@ FOREACH ($Module in $Modules) { [ARRAY]$LogPaths = $ConfigFileContent."LogPath_$($ConfigFileContent.LogPath[0])" [STRING]$LogFileKeepTime = $ConfigFileContent."LogFileKeepTime_$($ConfigFileContent.LogFileKeepTime[0])" -[STRING]$VersionURL = $ConfigFileContent."VersionURL_$($ConfigFileContent.VersionURL[0])" -[STRING]$DownloadURL = $ConfigFileContent."DownloadURL_$($ConfigFileContent.DownloadURL[0])" -[STRING]$InstallPath = $ConfigFileContent."InstallPath_$($ConfigFileContent.InstallPath[0])" +Try { + [OBJECT]$Firefox = New-Object PSObject -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name ProductName -Value "Firefox" -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name Action -Value $ConfigFileContent."FirefoxAction_$($ConfigFileContent.FirefoxAction[0])" -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name VersionURL -Value $ConfigFileContent."FirefoxVersionURL_$($ConfigFileContent.FirefoxVersionURL[0])" -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name DownloadURL -Value $ConfigFileContent."FirefoxDownloadURL_$($ConfigFileContent.FirefoxDownloadURL[0])" -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name InstallPath -Value $ConfigFileContent."FirefoxInstallPath_$($ConfigFileContent.FirefoxInstallPath[0])" -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name CurrentVersion -Value 0 -ErrorAction Stop + Add-Member -InputObject $Firefox -MemberType NoteProperty -Name NewVersion -Value 0 -ErrorAction Stop + +} Catch { + Write-Logfile -LogLine " " + Write-Logfile -LogLine "Error creating Object for: Firefox" + + Write-Logfile -LogLine "Property Value is missing or invalid!" +} #end try/catch + +Try { + [OBJECT]$Thunderbird = New-Object PSObject -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name ProductName -Value "Thunderbird" -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name Action -Value $ConfigFileContent."ThunderbirdAction_$($ConfigFileContent.ThunderbirdAction[0])" -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name VersionURL -Value $ConfigFileContent."ThunderbirdVersionURL_$($ConfigFileContent.ThunderbirdVersionURL[0])" -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name DownloadURL -Value $ConfigFileContent."ThunderbirdDownloadURL_$($ConfigFileContent.ThunderbirdDownloadURL[0])" -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name InstallPath -Value $ConfigFileContent."ThunderbirdInstallPath_$($ConfigFileContent.ThunderbirdInstallPath[0])" -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name CurrentVersion -Value 0 -ErrorAction Stop + Add-Member -InputObject $Thunderbird -MemberType NoteProperty -Name NewVersion -Value 0 -ErrorAction Stop + +} Catch { + Write-Logfile -LogLine " " + Write-Logfile -LogLine "Error creating Object for: Thunderbird" + Write-Logfile -LogLine "Property Value is missing or invalid!" + +} #end try/catch #-----------------------------------------------------------------------------------------------------# ############################################# main part ############################################### @@ -761,24 +810,88 @@ Write-Logfile -LogLine "from Account $env:USERDOMAIN\$env:USERNAME." Write-Logfile -LogLine "********************************************************************************" Write-Logfile -LogLine " " +Write-Logfile -LogLine "Starting with $($Firefox.ProductName) ..." +IF (($Firefox.Action) -and ($Firefox.VersionURL) -and ($Firefox.DownloadURL) -and ($Firefox.InstallPath)) { + Write-Logfile -LogLine "All required Variables are set for this Step." + Write-Logfile -LogLine "Action: $($Firefox.Action)" + Write-Logfile -LogLine "VersionURL: $($Firefox.VersionURL)" + Write-Logfile -LogLine "DownloadURL: $($Firefox.DownloadURL)" + Write-Logfile -LogLine "InstallPath: $($Firefox.InstallPath)" + Write-Logfile -LogLine " " + + $Firefox.CurrentVersion = Get-CurrentVersion -MozillaSoftware $Firefox.ProductName + $Firefox.NewVersion = Get-NewVersion -MozillaSoftware $Firefox.ProductName -VersionURL $Firefox.VersionURL[0] + + If ([Version]$Firefox.NewVersion -gt [Version]$Firefox.CurrentVersion) { -IF (($VersionURL) -and ($DownloadURL) -and ($InstallPath)) { - Write-Logfile -LogLine "All required Variables are set for this Script." + IF ($Firefox.Action -match "InstallAndUpdate") { + Write-Logfile -LogLine "Install or Update is neccessary!" + Install-NewVersion -MozillaSoftware $Firefox.ProductName -NewVersion $Firefox.NewVersion -DownloadURL $Firefox.DownloadURL[0] -InstallPath $Firefox.InstallPath[0] + Get-CurrentVersion -MozillaSoftware $Firefox.ProductName | Out-Null - $CurrentFirefoxVersion = Get-CurrentFirefoxVersion - $NewFirefoxVersion = Get-NewFirefoxVersion + } ElseIf (($Firefox.Action -match "UpdateOnly") -and ([Version]$Firefox.CurrentVersion -gt 0)) { + Write-Logfile -LogLine "Update is neccessary!" + Install-NewVersion -MozillaSoftware $Firefox.ProductName -NewVersion $Firefox.NewVersion -DownloadURL $Firefox.DownloadURL[0] -InstallPath $Firefox.InstallPath[0] + Get-CurrentVersion -MozillaSoftware $Firefox.ProductName | Out-Null + + } ElseIf (($Firefox.Action -match "UpdateOnly") -and (([Version]$Firefox.CurrentVersion -eq $NULL) -or ([Version]$Firefox.CurrentVersion -eq 0))) { + Write-Logfile -LogLine "Skipping Update because of non exisitng installation and config!" + + } Else { + Write-Logfile -LogLine "Unknown config!" + + } #end if/elseif/else + + } Else { + Write-Logfile -LogLine "No Install or Update is neccessary!" + } #end if/else + +} Else { + Write-Logfile -LogLine "Not all required Variables are set for this Step." + +} #end if/else + +Write-Logfile -LogLine "--------------------------------------------------------------------------------" + +Write-Logfile -LogLine " " +Write-Logfile -LogLine "Continue with $($Thunderbird.ProductName) ..." +IF (($Thunderbird.Action) -and ($Thunderbird.VersionURL) -and ($Thunderbird.DownloadURL) -and ($Thunderbird.InstallPath)) { + Write-Logfile -LogLine "All required Variables are set for this Step." + Write-Logfile -LogLine "Action: $($Thunderbird.Action)" + Write-Logfile -LogLine "VersionURL: $($Thunderbird.VersionURL)" + Write-Logfile -LogLine "DownloadURL: $($Thunderbird.DownloadURL)" + Write-Logfile -LogLine "InstallPath: $($Thunderbird.InstallPath)" + Write-Logfile -LogLine " " + + $Thunderbird.CurrentVersion = Get-CurrentVersion -MozillaSoftware $Thunderbird.ProductName + $Thunderbird.NewVersion = Get-NewVersion -MozillaSoftware $Thunderbird.ProductName -VersionURL $Thunderbird.VersionURL[0] - If ($NewFirefoxVersion -gt $CurrentFirefoxVersion) { - Write-Logfile -LogLine "Install or Update is neccessary!" - Update-NewFirefoxVersion -NewFirefoxVersion $NewFirefoxVersion -DownloadURL $DownloadURL - Write-Logfile -LogLine "Install or Update is completed!" - Get-CurrentFirefoxVersion | Out-Null + If ([Version]$Thunderbird.NewVersion -gt [Version]$Thunderbird.CurrentVersion) { + + IF ($Thunderbird.Action -match "InstallAndUpdate") { + Write-Logfile -LogLine "Install or Update is neccessary!" + Install-NewVersion -MozillaSoftware $Thunderbird.ProductName -NewVersion $Thunderbird.NewVersion -DownloadURL $Thunderbird.DownloadURL[0] -InstallPath $Thunderbird.InstallPath[0] + Get-CurrentVersion -MozillaSoftware $Thunderbird.ProductName | Out-Null + + } ElseIf (($Thunderbird.Action -match "UpdateOnly") -and ([Version]$Thunderbird.CurrentVersion -gt 0)) { + Write-Logfile -LogLine "Update is neccessary!" + Install-NewVersion -MozillaSoftware $Thunderbird.ProductName -NewVersion $Thunderbird.NewVersion -DownloadURL $Thunderbird.DownloadURL[0] -InstallPath $Thunderbird.InstallPath[0] + Get-CurrentVersion -MozillaSoftware $Thunderbird.ProductName | Out-Null + + } ElseIf (($Thunderbird.Action -match "UpdateOnly") -and (([Version]$Thunderbird.CurrentVersion -eq $NULL) -or ([Version]$Thunderbird.CurrentVersion -eq 0))) { + Write-Logfile -LogLine "Skipping Update because of non exisitng installation!" + + } Else { + Write-Logfile -LogLine "Unknown config!" + + } #end if/elseif/else + } Else { Write-Logfile -LogLine "No Install or Update is neccessary!" } #end if/else } Else { - Write-Logfile -LogLine "Not all required Variables are set for this Script." + Write-Logfile -LogLine "Not all required Variables are set for this Step." } #end if/else @@ -801,7 +914,7 @@ Write-Logfile -LogLine "******************************************************** #Enable only for debugging #exit -start-process -w + Remove-Variable -Name ScriptName -Force -ErrorAction SilentlyContinue Remove-Variable -Name ScriptPath -Force -ErrorAction SilentlyContinue Remove-Variable -Name ConfigFile -Force -ErrorAction SilentlyContinue @@ -820,10 +933,7 @@ Remove-Variable -Name ModuleDefaultSourcePath -Force -ErrorAction SilentlyC Remove-Variable -Name ModuleHKLMRegistryPath -Force -ErrorAction SilentlyContinue Remove-Variable -Name ModuleHKCURegistryPath -Force -ErrorAction SilentlyContinue -Remove-Variable -Name VersionURL -Force -ErrorAction SilentlyContinue -Remove-Variable -Name DownloadURL -Force -ErrorAction SilentlyContinue -Remove-Variable -Name InstallPath -Force -ErrorAction SilentlyContinue -Remove-Variable -Name CurrentFirefoxVersion -Force -ErrorAction SilentlyContinue -Remove-Variable -Name NewFirefoxVersion -Force -ErrorAction SilentlyContinue +Remove-Variable -Name Firefox -Force -ErrorAction SilentlyContinue +Remove-Variable -Name Thunderbird -Force -ErrorAction SilentlyContinue $error.clear() \ No newline at end of file diff --git a/current/Update-Firefox/Update-Firefox_Caller.cmd b/current/Update-MozillaSoftware/Update-MozillaSoftware_Caller.cmd similarity index 100% rename from current/Update-Firefox/Update-Firefox_Caller.cmd rename to current/Update-MozillaSoftware/Update-MozillaSoftware_Caller.cmd diff --git a/current/Update-Firefox/Update-Firefox_History.txt b/current/Update-MozillaSoftware/Update-MozillaSoftware_History.txt similarity index 65% rename from current/Update-Firefox/Update-Firefox_History.txt rename to current/Update-MozillaSoftware/Update-MozillaSoftware_History.txt index 5a6398e..2e52dda 100644 --- a/current/Update-Firefox/Update-Firefox_History.txt +++ b/current/Update-MozillaSoftware/Update-MozillaSoftware_History.txt @@ -1,3 +1,11 @@ +------------------------------------------------------------------------------- + +Version 1.2.0.0 - 24.11.2024 +NEW: - Added support for updating Thunderbird + - Added switch for install and update action (=FirefoxAction;=ThunderbirdAction) +FIX: - +CHG: - Script renamed. Old name: "Update-Firefox", new name: "Update-MozillaSoftware" +REM: - ------------------------------------------------------------------------------- diff --git a/current/Update-MozillaSoftware/Update-MozillaSoftware_Settings.ini b/current/Update-MozillaSoftware/Update-MozillaSoftware_Settings.ini new file mode 100644 index 0000000..8c6ab59 --- /dev/null +++ b/current/Update-MozillaSoftware/Update-MozillaSoftware_Settings.ini @@ -0,0 +1,95 @@ +#################################################################################################### +# Digital Data Configuration File (Template Date: 30.07.2016) # +# UTF-8 Coding required! # +# incl. FailSafe functions that are active when information is missing. # +#################################################################################################### + +#==================================================================================================# +########################################## General Setup ########################################### +#==================================================================================================# + +#################################################################################################### +# Path in which the log files will be stored. # +# Example: E:\LogFiles\ # +# FailSafe Setting is: \Logs # +#################################################################################################### +LogPath = + +#################################################################################################### +# Numerical value how long (in days) log files will be kept. ValidateRange is 0 - 1000 # +# Setting the Value to 0 disables this Function. # +# FailSafe Setting is: 60 # +#################################################################################################### +LogFileKeepTime = 30 + +#==================================================================================================# +########################################## Firefox Setup ########################################### +#==================================================================================================# + +#################################################################################################### +# FirefoxAction # +# Set the action to be performed! # +# Example: InstallAndUpdate # +# Example: UpdateOnly # +#################################################################################################### +FirefoxAction = InstallAndUpdate + +#################################################################################################### +# FirefoxVersionURL # +# Set the URL with the info about current version distibution. # +# Result file should be JSON # +#################################################################################################### +FirefoxVersionURL = https://product-details.mozilla.org/1.0/firefox_versions.json + +#################################################################################################### +# FirefoxDownloadURL # +# Set the URL where to download the new software version. # +# The URL can be case sensitive! # +# Use "%NewVersion%" as placeholder for the new version number, got from the VersionURL. # +#################################################################################################### +FirefoxDownloadURL = https://download-installer.cdn.mozilla.net/pub/firefox/releases/%NewVersion%/win64/de/Firefox%20Setup%20%NewVersion%.msi + +#################################################################################################### +# FirefoxInstallPath # +# Set the local installation path. # +#################################################################################################### +FirefoxInstallPath = D:\ProgramFiles\Mozilla Firefox + +#==================================================================================================# +######################################## Thunderbird Setup ######################################### +#==================================================================================================# + +#################################################################################################### +# ThunderbirdAction # +# Set the action to be performed! # +# Example: InstallAndUpdate # +# Example: UpdateOnly # +#################################################################################################### +ThunderbirdAction = InstallAndUpdate + +#################################################################################################### +# ThunderbirdVersionURL # +# Set the URL with the info about current version distibution. # +# Result file should be JSON # +#################################################################################################### +ThunderbirdVersionURL = https://product-details.mozilla.org/1.0/thunderbird_versions.json + +#################################################################################################### +# ThunderbirdDownloadURL # +# Set the URL where to download the new software version. # +# The URL can be case sensitive! # +# Use "%NewVersion%" as placeholder for the new version number, got from the VersionURL. # +#################################################################################################### +ThunderbirdDownloadURL = https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/%NewVersion%/win64/de/Thunderbird%20Setup%20%NewVersion%.msi + +#################################################################################################### +# ThunderbirdInstallPath # +# Set the local installation path. # +#################################################################################################### +ThunderbirdInstallPath = D:\ProgramFiles\Mozilla Thunderbird + +#################################################################################################### + +# Sources: +# https://stackoverflow.com/questions/36480534/is-there-an-api-to-retrieve-latest-versions-of-firefox-release-numbers-for-all-r +# https://github.com/ScoopInstaller/Extras/blob/master/bucket/thunderbird.json \ No newline at end of file diff --git a/current/Update-Firefox/Update-Firefox_WindowsTaskScheduler.xml b/current/Update-MozillaSoftware/Update-MozillaSoftware_WindowsTaskScheduler.xml similarity index 89% rename from current/Update-Firefox/Update-Firefox_WindowsTaskScheduler.xml rename to current/Update-MozillaSoftware/Update-MozillaSoftware_WindowsTaskScheduler.xml index 4ea7e413020b9209b6f3b47710b50e3da848ea93..0a7b8e35832c596c1497412ca54794cc3668618d 100644 GIT binary patch delta 156 zcmeB?StPT8iAmO%A)ld&A(J5o2oo8CfxI+^5{7ahyNDrmvnA7PE^oX_7-ASg844Iu afEr2|QWl3_~bG0Z>UILkUocE(40}WLDmZyr?3ZdGi6YtR1fa