This pull request adds support for several new Windows applications to the maintained apps list by introducing new configuration JSON files for each app under the `ee/maintained-apps/inputs/winget/` directory. Each file defines metadata and installation details for a specific application, including installer type, architecture, scope, categories, and optional install/uninstall scripts. This update expands the range of applications that can be managed and deployed. **New application definitions:** *Communication and Collaboration:* - Added `Amazon Chime` (`amazon-chime.json`), `Front` (`front.json`), and `Microsoft Teams` (`microsoft-teams.json`) with configuration for installation, uninstallation, and categorization under "Communication". [[1]](diffhunk://#diff-296db54aa9d8cea8e1302cc76e43abfd7565ab011bb3d1318a0d46c12b4b35f7R1-R12) [[2]](diffhunk://#diff-72a2bcc2c2b9fadcf09505f8caefb681e79679ee99fb068a84698c783e81f17dR1-R12) [[3]](diffhunk://#diff-9b5681ffd0b55fd89ce4f69e07668fa23df9582a921bf2000d9d2230429e16c9R1-R12) *Productivity and Utilities:* - Added `AnyDesk`, `Citrix Workspace`, `DeepL`, `Egnyte`, `Elgato Control Center`, `Elgato Stream Deck`, `Evernote`, `ExpressVPN`, `Hyper`, `Jabra Direct`, `Keeper Password Manager`, `LibreOffice`, and `MindManager` with appropriate installer details, categories, and scripts where applicable. [[1]](diffhunk://#diff-9a7ba8c0afb32ab31c2950a4a95847fa1293411416302cd6698dc2bcb519fbfdR1-R12) [[2]](diffhunk://#diff-3ba331a553f359a02dd3d824d3edab85292e2d1d9c1a6a739e313a9b63d5a88fR1-R13) [[3]](diffhunk://#diff-03fc24bba02df2bcfb57acabaffd8d3afac94bafbda450c4336a67f85bc4429eR1-R12) [[4]](diffhunk://#diff-ab44cad18bc633e446e1acd1714034464a92721e175cd0bd835fdb8eb4a7e0c8R1-R10) [[5]](diffhunk://#diff-e5b9495ea0a996194b5c04a9327b33220a7b24e0e9abff2153c98ec949018bc0R1-R10) [[6]](diffhunk://#diff-53b6cdd6d7032bffc8307f93a03eae3f1e82b57fa03316ad10b5b1af02b6c103R1-R10) [[7]](diffhunk://#diff-917d3e25bae801c48ae70f70bf43e8540d962046bb773dbeed633eb52323e084R1-R12) [[8]](diffhunk://#diff-b8f4026fc2a89254c0bdeb905120761ee78c6a76101deaf3dadd814ce3cafa94R1-R12) [[9]](diffhunk://#diff-5bdb4220ac0cc23ff96963f975a55ef081493ee797545e0a1f65f9f4c50ef982R1-R12) [[10]](diffhunk://#diff-941487a1c1f2ba4d2da50e47f47bbab46478f2bb7c7e009fdd21bf2b68090413R1-R12) [[11]](diffhunk://#diff-605ef361eebaf639aaa110d3599f53f84c5cd3fc2cbcb5960bb741385b59e5eaR1-R12) [[12]](diffhunk://#diff-fde7bf26f42621dd7f096bbb626af339e27312c0ca380ca2ef4a9f68ab1278ddR1-R11) [[13]](diffhunk://#diff-c293d2eda9fea8cc74547aefd99e078d181f29b04b4289ee88bbf91b09432ae1R1-R13) *Developer Tools:* - Added `Arduino IDE` and `iMazing Profile Editor` with installer metadata and categorized as "Developer tools". [[1]](diffhunk://#diff-eaf314e8b4d4156a5f428809d9dd6484d5585bfc7382658fc93744750347773fR1-R10) [[2]](diffhunk://#diff-649ae93e725621f9ee7d5fcddb3e81a2338eb3017ffae40a5dd915f42b75c8cfR1-R12) *Browsers and Utilities:* - Added `Arc` (browser) and `iMazing` (utility) with installation details and script paths. [[1]](diffhunk://#diff-bc27e68e5949eb7e4fd3c1d54f9f89b86cb6aed0e908f6687a4549dc81b65f49R1-R12) [[2]](diffhunk://#diff-7c778f4e3418f1b5ad0094b2c5d366d3690ae480ef3910f1833fba1197d71d9bR1-R12)
90 lines
2.8 KiB
PowerShell
90 lines
2.8 KiB
PowerShell
# Locates iMazing's Inno Setup uninstaller from the registry and runs it silently.
|
|
|
|
# Match the registry DisplayName (osquery programs.name).
|
|
$softwareNameLike = "iMazing"
|
|
|
|
# Inno Setup silent uninstall flags. /NORESTART suppresses the shell-extension reboot.
|
|
$silentArgs = "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS"
|
|
|
|
$paths = @(
|
|
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
|
|
'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
|
|
'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
|
|
'HKCU:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
|
|
)
|
|
|
|
$exitCode = 0
|
|
|
|
try {
|
|
|
|
[array]$uninstallKeys = Get-ChildItem -Path $paths -ErrorAction SilentlyContinue |
|
|
ForEach-Object { Get-ItemProperty $_.PSPath }
|
|
|
|
$foundUninstaller = $false
|
|
foreach ($key in $uninstallKeys) {
|
|
if ($key.DisplayName -eq $softwareNameLike) {
|
|
$foundUninstaller = $true
|
|
|
|
# Prefer QuietUninstallString when present.
|
|
$uninstallString = if ($key.QuietUninstallString) {
|
|
$key.QuietUninstallString
|
|
} else {
|
|
$key.UninstallString
|
|
}
|
|
|
|
# Parse the uninstall string defensively into executable + args.
|
|
$exePath = ""
|
|
$existingArgs = ""
|
|
if ($uninstallString -match '^\s*"([^"]+)"\s*(.*)$') {
|
|
$exePath = $matches[1]
|
|
$existingArgs = $matches[2].Trim()
|
|
} elseif ($uninstallString -match '(?i)^\s*(.+?\.exe)\s*(.*)$') {
|
|
$exePath = $matches[1]
|
|
$existingArgs = $matches[2].Trim()
|
|
} elseif ($uninstallString -match '^\s*(\S+)\s*(.*)$') {
|
|
$exePath = $matches[1]
|
|
$existingArgs = $matches[2].Trim()
|
|
} else {
|
|
Throw "Could not parse uninstall string: $uninstallString"
|
|
}
|
|
|
|
# Build argument list ensuring the Inno silent uninstall flags are present.
|
|
$argumentList = @()
|
|
if ($existingArgs -ne '') {
|
|
$argumentList += $existingArgs -split '\s+'
|
|
}
|
|
foreach ($flag in @('/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/CLOSEAPPLICATIONS')) {
|
|
if ($argumentList -notcontains $flag) {
|
|
$argumentList += $flag
|
|
}
|
|
}
|
|
|
|
Write-Host "Uninstall executable: $exePath"
|
|
Write-Host "Uninstall arguments: $($argumentList -join ' ')"
|
|
|
|
$processOptions = @{
|
|
FilePath = $exePath
|
|
ArgumentList = $argumentList
|
|
PassThru = $true
|
|
Wait = $true
|
|
}
|
|
|
|
$process = Start-Process @processOptions
|
|
$exitCode = $process.ExitCode
|
|
Write-Host "Uninstall exit code: $exitCode"
|
|
break
|
|
}
|
|
}
|
|
|
|
if (-not $foundUninstaller) {
|
|
Write-Host "Uninstall entry not found for $softwareNameLike"
|
|
Exit 0
|
|
}
|
|
|
|
Exit $exitCode
|
|
|
|
} catch {
|
|
Write-Host "Error: $_"
|
|
Exit 1
|
|
}
|