From 99a18e4f8ebae80b7eefb12c61bd739e1ebe1951 Mon Sep 17 00:00:00 2001 From: Gabe Date: Wed, 6 Aug 2025 17:08:14 +0000 Subject: [PATCH] Upload files to "App Install Scripts" --- .../App - Cato Client - Install.ps1 | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 App Install Scripts/App - Cato Client - Install.ps1 diff --git a/App Install Scripts/App - Cato Client - Install.ps1 b/App Install Scripts/App - Cato Client - Install.ps1 new file mode 100644 index 0000000..c0acab2 --- /dev/null +++ b/App Install Scripts/App - Cato Client - Install.ps1 @@ -0,0 +1,44 @@ +<# +Author: Gabe Kerntke +Date: 06-12-2025 + +.Synopsis +Script to install Cato on machines that do not already have it + +.Modified +2025-06-12 (GabeK) - Original script created +#> + +# Variables # + +$App_Name = "Cato Client" +$File_Name_Prefix = "Cato" +$File_Name_Extension = "exe" +$Install_Parameters = "/s" +$EPCache_Folder = "3rd Party Patches\$App_Name" + +#$Version_URL = "https://support.catonetworks.com/hc/en-us/articles/11276483327389-Summary-of-Cato-Windows-Client-Releases" +#$Online_Version = Invoke-RestMethod $Version_URL | Select-Object -ExpandProperty versions | Select-Object -ExpandProperty version | Select-Object -First 1 + +$DownloadURL = "https://clientdownload.catonetworks.com/public/clients/setup.exe" +$File_Name = "$File_Name_Prefix.$File_Name_Extension" +#$File_Name = "$File_Name_Prefix-$Online_Version.$File_Name_Extension" + +#Region Script Start +If ((Test-Path "C:\Temp\Script Cache") -eq $False) { New-Item -ItemType directory -Path "C:\Temp\Script Cache" } +Invoke-WebRequest -UseBasicParsing "https://scripts.gabesville.com/Gabesville/Powershell-Scripts/raw/branch/main/Functions%20Scripts/Functions.ps1" -outfile "C:\Temp\Script Cache\Functions.ps1" +. "C:\Temp\Script Cache\Functions.ps1" + +#Check to see if program is installed +$Applist = Get-Software | Sort-Object -Descending + +If ($Applist.DisplayName -eq $App_Name) { + Write-Host "$App_Name already Installed." + Get-Software | Where-Object { $_.DisplayName -contains $App_Name } | Select-Object DisplayName, DisplayVersion | Format-List + +} +Else { + Test-Probe_Online + Install-App +} +#Region Script End \ No newline at end of file