From 37754bdf9c09f398af7e992fb572de3dae525282 Mon Sep 17 00:00:00 2001 From: Ian Littman Date: Thu, 24 Apr 2025 18:40:47 -0400 Subject: [PATCH] Update FMAs, switch Brave install script (#28533) For #28376. --- .../inputs/winget/scripts/brave_install.ps1 | 91 +++++++-- .../inputs/winget/scripts/brave_uninstall.ps1 | 183 ++++++++++++++---- .../outputs/adobe-acrobat-reader/darwin.json | 10 +- .../outputs/brave-browser/darwin.json | 6 +- .../outputs/brave-browser/windows.json | 16 +- ee/maintained-apps/outputs/figma/darwin.json | 6 +- .../outputs/google-chrome/darwin.json | 2 +- .../outputs/google-chrome/windows.json | 8 +- .../outputs/microsoft-edge/darwin.json | 6 +- .../outputs/microsoft-teams/darwin.json | 6 +- ee/maintained-apps/outputs/notion/darwin.json | 6 +- .../outputs/postman/darwin.json | 6 +- .../outputs/whatsapp/darwin.json | 6 +- ee/maintained-apps/outputs/zoom/darwin.json | 6 +- 14 files changed, 259 insertions(+), 99 deletions(-) diff --git a/ee/maintained-apps/inputs/winget/scripts/brave_install.ps1 b/ee/maintained-apps/inputs/winget/scripts/brave_install.ps1 index da994474c4..b27b8e1015 100644 --- a/ee/maintained-apps/inputs/winget/scripts/brave_install.ps1 +++ b/ee/maintained-apps/inputs/winget/scripts/brave_install.ps1 @@ -1,29 +1,78 @@ -# Learn more about .exe install scripts: -# http://fleetdm.com/learn-more-about/exe-install-scripts - $exeFilePath = "${env:INSTALLER_PATH}" +$exitCode = 0 + try { -# Add argument to install silently -# Argument to make install silent depends on installer, -# each installer might use different argument (usually it's "/S" or "/s") -$processOptions = @{ - FilePath = "$exeFilePath" - ArgumentList = "--do-not-launch-chrome --system-level" - PassThru = $true - Wait = $true -} - -# Start process and track exit code -$process = Start-Process @processOptions -$exitCode = $process.ExitCode +# Copy the installer to a public folder so that all can access it +# users +$exeFilename = Split-Path $exeFilePath -leaf +Copy-Item -Path $exeFilePath -Destination "${env:PUBLIC}" -Force +$exeFilePath = "${env:PUBLIC}\$exeFilename" -# Prints the exit code -Write-Host "Install exit code: $exitCode" -Exit $exitCode +# Task properties. The task will be started by the logged in user +$action = New-ScheduledTaskAction -Execute "$exeFilePath" +$trigger = New-ScheduledTaskTrigger -AtLogOn +$userName = Get-CimInstance -ClassName Win32_ComputerSystem | + Select-Object -expand UserName +$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries + +# Create a task object with the properties defined above +$task = New-ScheduledTask -Action $action -Trigger $trigger ` + -Settings $settings + +# Register the task +$taskName = "fleet-install-$exeFilename" +Register-ScheduledTask "$taskName" -InputObject $task -User "$userName" + +# keep track of the start time to cancel if taking too long to start +$startDate = Get-Date + +# Start the task now that it is ready +Start-ScheduledTask -TaskName "$taskName" -TaskPath "\" + +# Wait for the task to be running +$state = (Get-ScheduledTask -TaskName "$taskName").State +Write-Host "ScheduledTask is '$state'" + +while ($state -ne "Running") { + Write-Host "ScheduledTask is '$state'. Waiting to run .exe..." + + $endDate = Get-Date + $elapsedTime = New-Timespan -Start $startDate -End $endDate + if ($elapsedTime.TotalSeconds -gt 120) { + Throw "Timed-out waiting for scheduled task state." + } + + Start-Sleep -Seconds 1 + $state = (Get-ScheduledTask -TaskName "$taskName").State +} + +# Wait for the task to be done +$state = (Get-ScheduledTask -TaskName "$taskName").State +while ($state -eq "Running") { + Write-Host "ScheduledTask is '$state'. Waiting for .exe to complete..." + + $endDate = Get-Date + $elapsedTime = New-Timespan -Start $startDate -End $endDate + if ($elapsedTime.TotalSeconds -gt 120) { + Throw "Timed-out waiting for scheduled task state." + } + + Start-Sleep -Seconds 10 + $state = (Get-ScheduledTask -TaskName "$taskName").State +} + +# Remove task +Write-Host "Removing ScheduledTask: $taskName." +Unregister-ScheduledTask -TaskName "$taskName" -Confirm:$false } catch { - Write-Host "Error: $_" - Exit 1 + Write-Host "Error: $_" + $exitCode = 1 +} finally { + # Remove installer + Remove-Item -Path $exeFilePath -Force } + +Exit $exitCode \ No newline at end of file diff --git a/ee/maintained-apps/inputs/winget/scripts/brave_uninstall.ps1 b/ee/maintained-apps/inputs/winget/scripts/brave_uninstall.ps1 index 2cab7057dd..c76ae227b2 100644 --- a/ee/maintained-apps/inputs/winget/scripts/brave_uninstall.ps1 +++ b/ee/maintained-apps/inputs/winget/scripts/brave_uninstall.ps1 @@ -1,54 +1,89 @@ +$softwareName = "Brave" + +# Script to uninstall software as the current logged-in user. +$userScript = @' + # Define acceptable/expected exit codes $ExpectedExitCodes = @(0, 19) -# Uninstall Registry Key -$machineKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\BraveSoftware Brave-Browser' +$softwareName = "Brave" -# Additional uninstall args +# Using the exact software name here is recommended to avoid +# uninstalling unintended software. +$softwareNameLike = "*$softwareName*" + +# Some uninstallers require additional flags to run silently. +# Each uninstaller might use a different argument (usually it's "/S" or "/s") $uninstallArgs = "--force-uninstall" -# Initialize exit code +$uninstallCommand = "" $exitCode = 0 try { - $key = Get-ItemProperty -Path $machineKey -ErrorAction Stop - # Get the uninstall command. Some uninstallers do not include 'QuietUninstallString' - $uninstallCommand = if ($key.QuietUninstallString) { - $key.QuietUninstallString - } else { - $key.UninstallString - } +$userKey = ` + 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' +[array]$uninstallKeys = Get-ChildItem ` + -Path @($userKey) ` + -ErrorAction SilentlyContinue | + ForEach-Object { Get-ItemProperty $_.PSPath } - # The uninstall command may contain command and args, like: - # "C:\Program Files\Software\uninstall.exe" --uninstall --silent - # Split the command and args - $splitArgs = $uninstallCommand.Split('"') - if ($splitArgs.Length -gt 1) { - if ($splitArgs.Length -eq 3) { - $uninstallArgs = "$( $splitArgs[2] ) $uninstallArgs".Trim() - } elseif ($splitArgs.Length -gt 3) { - Throw "Uninstall command contains multiple quoted strings. Please update the uninstall script.`nUninstall command: $uninstallCommand" +$foundUninstaller = $false +foreach ($key in $uninstallKeys) { + # If needed, add -notlike to the comparison to exclude certain similar + # software + if ($key.DisplayName -like $softwareNameLike) { + $foundUninstaller = $true + # Get the uninstall command. Some uninstallers do not include + # 'QuietUninstallString' and require a flag to run silently. + $uninstallCommand = if ($key.QuietUninstallString) { + $key.QuietUninstallString + } else { + $key.UninstallString } - $uninstallCommand = $splitArgs[1] - } - Write-Host "Uninstall command: $uninstallCommand" - Write-Host "Uninstall args: $uninstallArgs" + # The uninstall command may contain command and args, like: + # "C:\Program Files\Software\uninstall.exe" --uninstall --silent + # Split the command and args + $splitArgs = $uninstallCommand.Split('"') + if ($splitArgs.Length -gt 1) { + if ($splitArgs.Length -eq 3) { + $uninstallArgs = "$( $splitArgs[2] ) $uninstallArgs".Trim() + } elseif ($splitArgs.Length -gt 3) { + Throw ` + "Uninstall command contains multiple quoted strings. " + + "Please update the uninstall script.`n" + + "Uninstall command: $uninstallCommand" + } + $uninstallCommand = $splitArgs[1] + } + Write-Host "Uninstall command: $uninstallCommand" + Write-Host "Uninstall args: $uninstallArgs" - $processOptions = @{ - FilePath = $uninstallCommand - PassThru = $true - Wait = $true - } - if ($uninstallArgs -ne '') { - $processOptions.ArgumentList = "$uninstallArgs" - } + $processOptions = @{ + FilePath = $uninstallCommand + PassThru = $true + Wait = $true + } + if ($uninstallArgs -ne '') { + $processOptions.ArgumentList = "$uninstallArgs" + } - # Start uninstall process - $process = Start-Process @processOptions - $exitCode = $process.ExitCode - Write-Host "Uninstall exit code: $exitCode" + # Start the process and track the exit code + $process = Start-Process @processOptions + $exitCode = $process.ExitCode + + # Prints the exit code + Write-Host "Uninstall exit code: $exitCode" + # Exit the loop once the software is found and uninstalled. + break + } +} + +if (-not $foundUninstaller) { + Write-Host "Uninstaller for '$softwareName' not found." + $exitCode = 1 +} } catch { Write-Host "Error: $_" @@ -61,3 +96,79 @@ if ($ExpectedExitCodes -contains $exitCode) { } else { Exit $exitCode } +'@ + +$exitCode = 0 + +# Create a script in a public folder so that it can be accessed by all users. +$uninstallScriptPath = "${env:PUBLIC}/uninstall-$softwareName.ps1" +$taskName = "fleet-uninstall-$softwareName" +try { + Set-Content -Path $uninstallScriptPath -Value $userScript -Force + + # Task properties. The task will be started by the logged in user + $action = New-ScheduledTaskAction -Execute "PowerShell.exe" ` + -Argument "$uninstallScriptPath" + $trigger = New-ScheduledTaskTrigger -AtLogOn + $userName = Get-CimInstance -ClassName Win32_ComputerSystem | + Select-Object -expand UserName + $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries + + # Create a task object with the properties defined above + $task = New-ScheduledTask -Action $action -Trigger $trigger ` + -Settings $settings + + # Register the task + Register-ScheduledTask "$taskName" -InputObject $task -User "$userName" + + # keep track of the start time to cancel if taking too long to start + $startDate = Get-Date + + # Start the task now that it is ready + Start-ScheduledTask -TaskName "$taskName" -TaskPath "\" + + # Wait for the task to be running + $state = (Get-ScheduledTask -TaskName "$taskName").State + Write-Host "ScheduledTask is '$state'" + + while ($state -ne "Running") { + Write-Host "ScheduledTask is '$state'. Waiting to uninstall..." + + $endDate = Get-Date + $elapsedTime = New-Timespan -Start $startDate -End $endDate + if ($elapsedTime.TotalSeconds -gt 120) { + Throw "Timed-out waiting for scheduled task state." + } + + Start-Sleep -Seconds 1 + $state = (Get-ScheduledTask -TaskName "$taskName").State + } + + # Wait for the task to be done + $state = (Get-ScheduledTask -TaskName "$taskName").State + while ($state -eq "Running") { + Write-Host "ScheduledTask is '$state'. Waiting for .exe to complete..." + + $endDate = Get-Date + $elapsedTime = New-Timespan -Start $startDate -End $endDate + if ($elapsedTime.TotalSeconds -gt 120) { + Throw "Timed-out waiting for scheduled task state." + } + + Start-Sleep -Seconds 10 + $state = (Get-ScheduledTask -TaskName "$taskName").State + } + +} catch { + Write-Host "Error: $_" + $exitCode = 1 +} finally { + # Remove task + Write-Host "Removing ScheduledTask: $taskName." + Unregister-ScheduledTask -TaskName "$taskName" -Confirm:$false + + # Remove user script + Remove-Item -Path $uninstallScriptPath -Force +} + +Exit $exitCode \ No newline at end of file diff --git a/ee/maintained-apps/outputs/adobe-acrobat-reader/darwin.json b/ee/maintained-apps/outputs/adobe-acrobat-reader/darwin.json index 611aab641c..8d728ba6e1 100644 --- a/ee/maintained-apps/outputs/adobe-acrobat-reader/darwin.json +++ b/ee/maintained-apps/outputs/adobe-acrobat-reader/darwin.json @@ -1,18 +1,18 @@ { "versions": [ { - "version": "25.001.20432", + "version": "25.001.20467", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.adobe.Reader';" }, - "installer_url": "https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/2500120432/AcroRdrDC_2500120432_MUI.dmg", - "install_script_ref": "79f66713", + "installer_url": "https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/2500120467/AcroRdrDC_2500120467_MUI.dmg", + "install_script_ref": "9a641d0a", "uninstall_script_ref": "6949c08e", - "sha256": "7a668c506c4694bb4f481eb3f6f98f17ee28975366e9547bddbb407238d37718" + "sha256": "780491cb985d853e150402530e36ccfb3d85e42919e78aee97792638998d12af" } ], "refs": { "6949c08e": "#!/bin/sh\n\n# variables\nLOGGED_IN_USER=$(scutil \u003c\u003c\u003c \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n if ! osascript -e \"application id \\\"$bundle_id\\\" is running\" 2\u003e/dev/null; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 \u0026\u0026 \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS \u003c timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" \u003e/dev/null 2\u003e\u00261; then\n if ! pgrep -f \"$bundle_id\" \u003e/dev/null 2\u003e\u00261; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\nremove_launchctl_service() {\n local service=\"$1\"\n local booleans=(\"true\" \"false\")\n local plist_status\n local paths\n local should_sudo\n\n echo \"Removing launchctl service ${service}\"\n\n for should_sudo in \"${booleans[@]}\"; do\n plist_status=$(launchctl list \"${service}\" 2\u003e/dev/null)\n\n if [[ $plist_status == \\{* ]]; then\n if [[ $should_sudo == \"true\" ]]; then\n sudo launchctl remove \"${service}\"\n else\n launchctl remove \"${service}\"\n fi\n sleep 1\n fi\n\n paths=(\n \"/Library/LaunchAgents/${service}.plist\"\n \"/Library/LaunchDaemons/${service}.plist\"\n )\n\n # if not using sudo, prepend the home directory to the paths\n if [[ $should_sudo == \"false\" ]]; then\n for i in \"${!paths[@]}\"; do\n paths[i]=\"${HOME}${paths[i]}\"\n done\n fi\n\n for path in \"${paths[@]}\"; do\n if [[ -e \"$path\" ]]; then\n if [[ $should_sudo == \"true\" ]]; then\n sudo rm -f -- \"$path\"\n else\n rm -f -- \"$path\"\n fi\n fi\n done\n done\n}\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nremove_launchctl_service 'com.adobe.ARMDC.Communicator'\nremove_launchctl_service 'com.adobe.ARMDC.SMJobBlessHelper'\nremove_launchctl_service 'com.adobe.ARMDCHelper.cc24aef4a1b90ed56a725c38014c95072f92651fb65e1bf9c8e43c37a23d420d'\nquit_application 'com.adobe.AdobeRdrCEF'\nquit_application 'com.adobe.AdobeRdrCEFHelper'\nquit_application 'com.adobe.Reader'\nsudo pkgutil --forget 'com.adobe.acrobat.DC.reader.*'\nsudo pkgutil --forget 'com.adobe.armdc.app.pkg'\nsudo pkgutil --forget 'com.adobe.RdrServicesUpdater'\nsudo rm -rf '/Applications/Adobe Acrobat Reader.app'\nsudo rm -rf '/Library/Preferences/com.adobe.reader.DC.WebResource.plist'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.adobe.Reader'\ntrash $LOGGED_IN_USER '~/Library/HTTPStorages/com.adobe.Reader'\ntrash $LOGGED_IN_USER '~/Library/HTTPStorages/com.adobe.Reader.binarycookies'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.adobe.AdobeRdrCEFHelper.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.adobe.crashreporter.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.adobe.Install.Reader.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.adobe.Reader.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.adobe.Reader.savedState'\n", - "79f66713": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n\n# extract contents\nMOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)\nhdiutil attach -plist -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\"\nsudo cp -R \"$MOUNT_POINT\"/* \"$TMPDIR\"\nhdiutil detach \"$MOUNT_POINT\"\n# install pkg files\nsudo installer -pkg \"$TMPDIR/AcroRdrDC_2500120432_MUI.pkg\" -target /\n" + "9a641d0a": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n\n# extract contents\nMOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)\nhdiutil attach -plist -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\"\nsudo cp -R \"$MOUNT_POINT\"/* \"$TMPDIR\"\nhdiutil detach \"$MOUNT_POINT\"\n# install pkg files\nsudo installer -pkg \"$TMPDIR/AcroRdrDC_2500120467_MUI.pkg\" -target /\n" } } \ No newline at end of file diff --git a/ee/maintained-apps/outputs/brave-browser/darwin.json b/ee/maintained-apps/outputs/brave-browser/darwin.json index 1aea266d29..fa79f15684 100644 --- a/ee/maintained-apps/outputs/brave-browser/darwin.json +++ b/ee/maintained-apps/outputs/brave-browser/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "1.77.100.0", + "version": "1.77.101.0", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.brave.Browser';" }, - "installer_url": "https://updates-cdn.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/177.100/Brave-Browser-arm64.dmg", + "installer_url": "https://updates-cdn.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/177.101/Brave-Browser-arm64.dmg", "install_script_ref": "8236d102", "uninstall_script_ref": "e860eed9", - "sha256": "f999ee83d7847a58ef533d7147596cd345ec337b2e4ea7d31619ac5acb90762f" + "sha256": "6ee662df9a133910a68c71c36b56ec4c932575200318c615f7c3de1d561f8703" } ], "refs": { diff --git a/ee/maintained-apps/outputs/brave-browser/windows.json b/ee/maintained-apps/outputs/brave-browser/windows.json index 057899394c..78889108f3 100644 --- a/ee/maintained-apps/outputs/brave-browser/windows.json +++ b/ee/maintained-apps/outputs/brave-browser/windows.json @@ -1,18 +1,18 @@ { "versions": [ { - "version": "135.1.77.97", + "version": "135.1.77.101", "queries": { "exists": "SELECT 1 FROM programs WHERE name = 'Brave' AND publisher = 'Brave Software Inc';" }, - "installer_url": "https://updates-cdn.bravesoftware.com/build/Brave-Release/x64-rel/win/135.1.77.97/brave_installer-x64.exe", - "install_script_ref": "0319c426", - "uninstall_script_ref": "da8237ee", - "sha256": "284f27ad9448634efc4f0f7b418501f0c77b5eab8ab0138da34034a9989706ff" + "installer_url": "https://github.com/brave/brave-browser/releases/download/v1.77.101/BraveBrowserStandaloneSilentSetup.exe", + "install_script_ref": "4583e120", + "uninstall_script_ref": "df616a7a", + "sha256": "68c80e04d2c3397d484c2328b7b93de4f1c02ebe512268ffd9526cb81366f220" } ], "refs": { - "0319c426": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\n# Add argument to install silently\n# Argument to make install silent depends on installer,\n# each installer might use different argument (usually it's \"/S\" or \"/s\")\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--do-not-launch-chrome --system-level\"\n PassThru = $true\n Wait = $true\n}\n \n# Start process and track exit code\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\n# Prints the exit code\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n", - "da8237ee": "# Define acceptable/expected exit codes\n$ExpectedExitCodes = @(0, 19)\n\n# Uninstall Registry Key\n$machineKey = 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BraveSoftware Brave-Browser'\n\n# Additional uninstall args\n$uninstallArgs = \"--force-uninstall\"\n\n# Initialize exit code\n$exitCode = 0\n\ntry {\n $key = Get-ItemProperty -Path $machineKey -ErrorAction Stop\n\n # Get the uninstall command. Some uninstallers do not include 'QuietUninstallString'\n $uninstallCommand = if ($key.QuietUninstallString) {\n $key.QuietUninstallString\n } else {\n $key.UninstallString\n }\n\n # The uninstall command may contain command and args, like:\n # \"C:\\Program Files\\Software\\uninstall.exe\" --uninstall --silent\n # Split the command and args\n $splitArgs = $uninstallCommand.Split('\"')\n if ($splitArgs.Length -gt 1) {\n if ($splitArgs.Length -eq 3) {\n $uninstallArgs = \"$( $splitArgs[2] ) $uninstallArgs\".Trim()\n } elseif ($splitArgs.Length -gt 3) {\n Throw \"Uninstall command contains multiple quoted strings. Please update the uninstall script.`nUninstall command: $uninstallCommand\"\n }\n $uninstallCommand = $splitArgs[1]\n }\n\n Write-Host \"Uninstall command: $uninstallCommand\"\n Write-Host \"Uninstall args: $uninstallArgs\"\n\n $processOptions = @{\n FilePath = $uninstallCommand\n PassThru = $true\n Wait = $true\n }\n if ($uninstallArgs -ne '') {\n $processOptions.ArgumentList = \"$uninstallArgs\"\n }\n\n # Start uninstall process\n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n Write-Host \"Uninstall exit code: $exitCode\"\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n}\n\n# Treat acceptable exit codes as success\nif ($ExpectedExitCodes -contains $exitCode) {\n Exit 0\n} else {\n Exit $exitCode\n}\n" + "4583e120": "$exeFilePath = \"${env:INSTALLER_PATH}\"\n\n$exitCode = 0\n\ntry {\n\n# Copy the installer to a public folder so that all can access it\n# users\n$exeFilename = Split-Path $exeFilePath -leaf\nCopy-Item -Path $exeFilePath -Destination \"${env:PUBLIC}\" -Force\n$exeFilePath = \"${env:PUBLIC}\\$exeFilename\"\n\n# Task properties. The task will be started by the logged in user\n$action = New-ScheduledTaskAction -Execute \"$exeFilePath\"\n$trigger = New-ScheduledTaskTrigger -AtLogOn\n$userName = Get-CimInstance -ClassName Win32_ComputerSystem |\n Select-Object -expand UserName\n$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries\n\n# Create a task object with the properties defined above\n$task = New-ScheduledTask -Action $action -Trigger $trigger `\n -Settings $settings\n\n# Register the task\n$taskName = \"fleet-install-$exeFilename\"\nRegister-ScheduledTask \"$taskName\" -InputObject $task -User \"$userName\"\n\n# keep track of the start time to cancel if taking too long to start\n$startDate = Get-Date\n\n# Start the task now that it is ready\nStart-ScheduledTask -TaskName \"$taskName\" -TaskPath \"\\\"\n\n# Wait for the task to be running\n$state = (Get-ScheduledTask -TaskName \"$taskName\").State\nWrite-Host \"ScheduledTask is '$state'\"\n\nwhile ($state -ne \"Running\") {\n Write-Host \"ScheduledTask is '$state'. Waiting to run .exe...\"\n\n $endDate = Get-Date\n $elapsedTime = New-Timespan -Start $startDate -End $endDate\n if ($elapsedTime.TotalSeconds -gt 120) {\n Throw \"Timed-out waiting for scheduled task state.\"\n }\n\n Start-Sleep -Seconds 1\n $state = (Get-ScheduledTask -TaskName \"$taskName\").State\n}\n\n# Wait for the task to be done\n$state = (Get-ScheduledTask -TaskName \"$taskName\").State\nwhile ($state -eq \"Running\") {\n Write-Host \"ScheduledTask is '$state'. Waiting for .exe to complete...\"\n\n $endDate = Get-Date\n $elapsedTime = New-Timespan -Start $startDate -End $endDate\n if ($elapsedTime.TotalSeconds -gt 120) {\n Throw \"Timed-out waiting for scheduled task state.\"\n }\n\n Start-Sleep -Seconds 10\n $state = (Get-ScheduledTask -TaskName \"$taskName\").State\n}\n\n# Remove task\nWrite-Host \"Removing ScheduledTask: $taskName.\"\nUnregister-ScheduledTask -TaskName \"$taskName\" -Confirm:$false\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n} finally {\n # Remove installer\n Remove-Item -Path $exeFilePath -Force\n}\n\nExit $exitCode", + "df616a7a": "$softwareName = \"Brave\"\n\n# Script to uninstall software as the current logged-in user.\n$userScript = @'\n\n# Define acceptable/expected exit codes\n$ExpectedExitCodes = @(0, 19)\n\n$softwareName = \"Brave\"\n\n# Using the exact software name here is recommended to avoid\n# uninstalling unintended software.\n$softwareNameLike = \"*$softwareName*\"\n\n# Some uninstallers require additional flags to run silently.\n# Each uninstaller might use a different argument (usually it's \"/S\" or \"/s\")\n$uninstallArgs = \"--force-uninstall\"\n\n$uninstallCommand = \"\"\n$exitCode = 0\n\ntry {\n\n$userKey = `\n 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n[array]$uninstallKeys = Get-ChildItem `\n -Path @($userKey) `\n -ErrorAction SilentlyContinue |\n ForEach-Object { Get-ItemProperty $_.PSPath }\n\n$foundUninstaller = $false\nforeach ($key in $uninstallKeys) {\n # If needed, add -notlike to the comparison to exclude certain similar\n # software\n if ($key.DisplayName -like $softwareNameLike) {\n $foundUninstaller = $true\n # Get the uninstall command. Some uninstallers do not include\n # 'QuietUninstallString' and require a flag to run silently.\n $uninstallCommand = if ($key.QuietUninstallString) {\n $key.QuietUninstallString\n } else {\n $key.UninstallString\n }\n\n # The uninstall command may contain command and args, like:\n # \"C:\\Program Files\\Software\\uninstall.exe\" --uninstall --silent\n # Split the command and args\n $splitArgs = $uninstallCommand.Split('\"')\n if ($splitArgs.Length -gt 1) {\n if ($splitArgs.Length -eq 3) {\n $uninstallArgs = \"$( $splitArgs[2] ) $uninstallArgs\".Trim()\n } elseif ($splitArgs.Length -gt 3) {\n Throw `\n \"Uninstall command contains multiple quoted strings. \" +\n \"Please update the uninstall script.`n\" +\n \"Uninstall command: $uninstallCommand\"\n }\n $uninstallCommand = $splitArgs[1]\n }\n Write-Host \"Uninstall command: $uninstallCommand\"\n Write-Host \"Uninstall args: $uninstallArgs\"\n\n $processOptions = @{\n FilePath = $uninstallCommand\n PassThru = $true\n Wait = $true\n }\n if ($uninstallArgs -ne '') {\n $processOptions.ArgumentList = \"$uninstallArgs\"\n }\n\n # Start the process and track the exit code\n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n\n # Prints the exit code\n Write-Host \"Uninstall exit code: $exitCode\"\n # Exit the loop once the software is found and uninstalled.\n break\n }\n}\n\nif (-not $foundUninstaller) {\n Write-Host \"Uninstaller for '$softwareName' not found.\"\n $exitCode = 1\n}\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n}\n\n# Treat acceptable exit codes as success\nif ($ExpectedExitCodes -contains $exitCode) {\n Exit 0\n} else {\n Exit $exitCode\n}\n'@\n\n$exitCode = 0\n\n# Create a script in a public folder so that it can be accessed by all users.\n$uninstallScriptPath = \"${env:PUBLIC}/uninstall-$softwareName.ps1\"\n$taskName = \"fleet-uninstall-$softwareName\"\ntry {\n Set-Content -Path $uninstallScriptPath -Value $userScript -Force\n\n # Task properties. The task will be started by the logged in user\n $action = New-ScheduledTaskAction -Execute \"PowerShell.exe\" `\n -Argument \"$uninstallScriptPath\"\n $trigger = New-ScheduledTaskTrigger -AtLogOn\n $userName = Get-CimInstance -ClassName Win32_ComputerSystem |\n Select-Object -expand UserName\n $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries\n\n # Create a task object with the properties defined above\n $task = New-ScheduledTask -Action $action -Trigger $trigger `\n -Settings $settings\n\n # Register the task\n Register-ScheduledTask \"$taskName\" -InputObject $task -User \"$userName\"\n\n # keep track of the start time to cancel if taking too long to start\n $startDate = Get-Date\n\n # Start the task now that it is ready\n Start-ScheduledTask -TaskName \"$taskName\" -TaskPath \"\\\"\n\n # Wait for the task to be running\n $state = (Get-ScheduledTask -TaskName \"$taskName\").State\n Write-Host \"ScheduledTask is '$state'\"\n\n while ($state -ne \"Running\") {\n Write-Host \"ScheduledTask is '$state'. Waiting to uninstall...\"\n\n $endDate = Get-Date\n $elapsedTime = New-Timespan -Start $startDate -End $endDate\n if ($elapsedTime.TotalSeconds -gt 120) {\n Throw \"Timed-out waiting for scheduled task state.\"\n }\n\n Start-Sleep -Seconds 1\n $state = (Get-ScheduledTask -TaskName \"$taskName\").State\n }\n\n # Wait for the task to be done\n $state = (Get-ScheduledTask -TaskName \"$taskName\").State\n while ($state -eq \"Running\") {\n Write-Host \"ScheduledTask is '$state'. Waiting for .exe to complete...\"\n\n $endDate = Get-Date\n $elapsedTime = New-Timespan -Start $startDate -End $endDate\n if ($elapsedTime.TotalSeconds -gt 120) {\n Throw \"Timed-out waiting for scheduled task state.\"\n }\n\n Start-Sleep -Seconds 10\n $state = (Get-ScheduledTask -TaskName \"$taskName\").State\n }\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n} finally {\n # Remove task\n Write-Host \"Removing ScheduledTask: $taskName.\"\n Unregister-ScheduledTask -TaskName \"$taskName\" -Confirm:$false\n\n # Remove user script\n Remove-Item -Path $uninstallScriptPath -Force\n}\n\nExit $exitCode" } -} +} \ No newline at end of file diff --git a/ee/maintained-apps/outputs/figma/darwin.json b/ee/maintained-apps/outputs/figma/darwin.json index d99cbd5ebf..b00167664b 100644 --- a/ee/maintained-apps/outputs/figma/darwin.json +++ b/ee/maintained-apps/outputs/figma/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "125.2.3", + "version": "125.3.6", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.figma.Desktop';" }, - "installer_url": "https://desktop.figma.com/mac-arm/Figma-125.2.3.zip", + "installer_url": "https://desktop.figma.com/mac-arm/Figma-125.3.6.zip", "install_script_ref": "51e6e0ba", "uninstall_script_ref": "d5a2e180", - "sha256": "930bcd4782f2dbda7b6e5e3edfd0b884b3ebbbe1448e70422a3296713bb0ca25" + "sha256": "2609701885880c8b94261cd35a40d37baa726207baa05edf89737e4d8bb5bc69" } ], "refs": { diff --git a/ee/maintained-apps/outputs/google-chrome/darwin.json b/ee/maintained-apps/outputs/google-chrome/darwin.json index 736b4fb4f4..506dd95390 100644 --- a/ee/maintained-apps/outputs/google-chrome/darwin.json +++ b/ee/maintained-apps/outputs/google-chrome/darwin.json @@ -1,7 +1,7 @@ { "versions": [ { - "version": "135.0.7049.96", + "version": "135.0.7049.115", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.google.Chrome';" }, diff --git a/ee/maintained-apps/outputs/google-chrome/windows.json b/ee/maintained-apps/outputs/google-chrome/windows.json index da88c2e684..279c561ca5 100644 --- a/ee/maintained-apps/outputs/google-chrome/windows.json +++ b/ee/maintained-apps/outputs/google-chrome/windows.json @@ -1,18 +1,18 @@ { "versions": [ { - "version": "135.0.7049.96", + "version": "135.0.7049.115", "queries": { "exists": "SELECT 1 FROM programs WHERE name = 'Google Chrome' AND publisher = 'Google LLC';" }, "installer_url": "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi", "install_script_ref": "8959087b", - "uninstall_script_ref": "d820be68", + "uninstall_script_ref": "04facd6e", "sha256": "no_check" } ], "refs": { - "8959087b": "$logFile = \"${env:TEMP}/fleet-install-software.log\"\n\ntry {\n\n$installProcess = Start-Process msiexec.exe `\n -ArgumentList \"/quiet /norestart /lv ${logFile} /i `\"${env:INSTALLER_PATH}`\"\" `\n -PassThru -Verb RunAs -Wait\n\nGet-Content $logFile -Tail 500\n\nExit $installProcess.ExitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n", - "d820be68": "$product_code = \"{7537FCCC-472F-38B2-93E7-05DD4F526C6D}\"\n\n# Fleet uninstalls app using product code that's extracted on upload\nmsiexec /quiet /x $product_code\nExit $LASTEXITCODE\n" + "04facd6e": "$product_code = \"{3AC1073B-083C-3A6C-94BE-7339E0B00CD4}\"\n\n# Fleet uninstalls app using product code that's extracted on upload\nmsiexec /quiet /x $product_code\nExit $LASTEXITCODE\n", + "8959087b": "$logFile = \"${env:TEMP}/fleet-install-software.log\"\n\ntry {\n\n$installProcess = Start-Process msiexec.exe `\n -ArgumentList \"/quiet /norestart /lv ${logFile} /i `\"${env:INSTALLER_PATH}`\"\" `\n -PassThru -Verb RunAs -Wait\n\nGet-Content $logFile -Tail 500\n\nExit $installProcess.ExitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n" } } \ No newline at end of file diff --git a/ee/maintained-apps/outputs/microsoft-edge/darwin.json b/ee/maintained-apps/outputs/microsoft-edge/darwin.json index ad05676146..f3d18787de 100644 --- a/ee/maintained-apps/outputs/microsoft-edge/darwin.json +++ b/ee/maintained-apps/outputs/microsoft-edge/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "135.0.3179.73", + "version": "135.0.3179.98", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.edgemac';" }, - "installer_url": "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/62b79ad0-71e3-4583-be18-e85c2546f611/MicrosoftEdge-135.0.3179.73.dmg", + "installer_url": "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/394fa611-6cff-485f-8c99-b43fcece1f7a/MicrosoftEdge-135.0.3179.98.dmg", "install_script_ref": "bdc4bed3", "uninstall_script_ref": "2ec79299", - "sha256": "c82e8845b49c0bf44ad88a4134b9baf0fc078583096d60e6d8992024088c0054" + "sha256": "51a6442e7e6defee3b1118a6c1a9e4f28f516c7f66f7c1e86372863fa121a5dc" } ], "refs": { diff --git a/ee/maintained-apps/outputs/microsoft-teams/darwin.json b/ee/maintained-apps/outputs/microsoft-teams/darwin.json index 6e5573445b..069a616e4f 100644 --- a/ee/maintained-apps/outputs/microsoft-teams/darwin.json +++ b/ee/maintained-apps/outputs/microsoft-teams/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "25060.203.3471.5023", + "version": "25079.2107.3576.1611", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.teams2';" }, - "installer_url": "https://statics.teams.cdn.office.net/production-osx/25060.203.3471.5023/MicrosoftTeams.pkg", + "installer_url": "https://statics.teams.cdn.office.net/production-osx/25079.2107.3576.1611/MicrosoftTeams.pkg", "install_script_ref": "68cd6c20", "uninstall_script_ref": "f8bcea83", - "sha256": "554cc8f8534e54eff2e7c950c6c6fbbd90f7161d5bef0d99c33e7238a869cf07" + "sha256": "e580d4691c89ba178edd7b494f2fac981e121fac912c4cb592bf9454c15904ae" } ], "refs": { diff --git a/ee/maintained-apps/outputs/notion/darwin.json b/ee/maintained-apps/outputs/notion/darwin.json index f6ec645887..b8b4042064 100644 --- a/ee/maintained-apps/outputs/notion/darwin.json +++ b/ee/maintained-apps/outputs/notion/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "4.8.7", + "version": "4.9.1", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'notion.id';" }, - "installer_url": "https://desktop-release.notion-static.com/Notion-4.8.7-arm64.dmg", + "installer_url": "https://desktop-release.notion-static.com/Notion-4.9.1-arm64.dmg", "install_script_ref": "11cbfa59", "uninstall_script_ref": "21cd1000", - "sha256": "a0fe8d7d3bb200f40e07cfafa1f7409e73838c1bb7d530d5f2564b9061a643df" + "sha256": "7e61fe7f644a12be7e355676e8f78a5c525dcb1e70dadd4bb0f952ef6bcff3a7" } ], "refs": { diff --git a/ee/maintained-apps/outputs/postman/darwin.json b/ee/maintained-apps/outputs/postman/darwin.json index 7209950382..4494217bb3 100644 --- a/ee/maintained-apps/outputs/postman/darwin.json +++ b/ee/maintained-apps/outputs/postman/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "11.41.4", + "version": "11.42.4", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.postmanlabs.mac';" }, - "installer_url": "https://dl.pstmn.io/download/version/11.41.4/osx_arm64", + "installer_url": "https://dl.pstmn.io/download/version/11.42.4/osx_arm64", "install_script_ref": "1809f0b2", "uninstall_script_ref": "15e9f11c", - "sha256": "4f764d2e75e47fbe9cd43cb32a9df2d1bf482881f757775b78ceb197eccf383a" + "sha256": "e0fc86ff2dc42e4c41143b0c648086c03d24e8d64e9e5ad7876cd2cde949397a" } ], "refs": { diff --git a/ee/maintained-apps/outputs/whatsapp/darwin.json b/ee/maintained-apps/outputs/whatsapp/darwin.json index f52c650b80..69a003f4b8 100644 --- a/ee/maintained-apps/outputs/whatsapp/darwin.json +++ b/ee/maintained-apps/outputs/whatsapp/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "2.25.10.72", + "version": "2.25.11.76", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'net.whatsapp.WhatsApp';" }, - "installer_url": "https://web.whatsapp.com/desktop/mac_native/release/?version=2.25.10.72\u0026extension=zip\u0026configuration=Release\u0026branch=relbranch", + "installer_url": "https://web.whatsapp.com/desktop/mac_native/release/?version=2.25.11.76\u0026extension=zip\u0026configuration=Release\u0026branch=relbranch", "install_script_ref": "855416a1", "uninstall_script_ref": "1601899d", - "sha256": "396cd3ab43dec85b105dbc83ca623c7a26490af261acf7183664330b2f25b428" + "sha256": "ac4d757971b351ac780210340723f95eb5a0a74dc599a29968c003c042569ad1" } ], "refs": { diff --git a/ee/maintained-apps/outputs/zoom/darwin.json b/ee/maintained-apps/outputs/zoom/darwin.json index 38891698a1..a2b406832e 100644 --- a/ee/maintained-apps/outputs/zoom/darwin.json +++ b/ee/maintained-apps/outputs/zoom/darwin.json @@ -1,14 +1,14 @@ { "versions": [ { - "version": "6.4.5.53616", + "version": "6.4.6.53970", "queries": { "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'us.zoom.xos';" }, - "installer_url": "https://cdn.zoom.us/prod/6.4.5.53616/ZoomInstallerIT.pkg", + "installer_url": "https://cdn.zoom.us/prod/6.4.6.53970/ZoomInstallerIT.pkg", "install_script_ref": "2d889c52", "uninstall_script_ref": "b91fca4d", - "sha256": "f1241dbf9bada2f076d32677849d0aecf8a92dcf0002cc3e93e78d7037f815b4" + "sha256": "24ec22c90754e7dcf6e4af7c574b51e95df37de72397a27cd085fc526c14008a" } ], "refs": {