Add 010 Editor as a Windows FMA (#37234)

This pull request adds support for managing the installation and
uninstallation of 010 Editor (version 16.0.2, 64-bit) on Windows via
Winget in the maintained apps system. It introduces metadata,
install/uninstall scripts, and output definitions for this application,
enabling automated deployment and inventory.

**010 Editor integration:**

* Added a new input definition for 010 Editor in
`winget/010-editor.json`, specifying metadata, installer details, and
script paths.
* Implemented PowerShell scripts for silent installation
(`010-editor_install.ps1`) and uninstallation
(`010-editor_uninstall.ps1`) tailored for Inno Setup-based installers.
[[1]](diffhunk://#diff-4d1e3101294ff5dcd9414cbbd5a470a1bd2942f5d4e8db5c25c9fe4098b815b3R1-R28)
[[2]](diffhunk://#diff-2ec71055559f078b69fc8cd53d483fc7738f0dbe7af384dda9587ecd76aeed23R1-R91)

**Output and inventory updates:**

* Generated a new output file `windows.json` for 010 Editor, including
version info, installation checks, installer URL, script references, and
SHA256 hash.
* Updated the main `apps.json` output to include 010 Editor as a Windows
application, ensuring it appears in the maintained apps inventory.
This commit is contained in:
Allen Houchins
2025-12-13 21:00:02 -06:00
committed by GitHub
parent 56bad6fbba
commit 734031f733
5 changed files with 160 additions and 0 deletions
@@ -0,0 +1,12 @@
{
"name": "010 Editor",
"slug": "010-editor/windows",
"package_identifier": "SweetScape.010Editor",
"unique_identifier": "010 Editor 16.0.2 (64-bit)",
"installer_arch": "x64",
"installer_type": "exe",
"installer_scope": "machine",
"default_categories": ["Developer tools"],
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/010-editor_install.ps1",
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/010-editor_uninstall.ps1"
}
@@ -0,0 +1,28 @@
# Learn more about .exe install scripts:
# http://fleetdm.com/learn-more-about/exe-install-scripts
$exeFilePath = "${env:INSTALLER_PATH}"
try {
# Add arguments to install silently (010 Editor uses an Inno Setup-based installer)
$processOptions = @{
FilePath = "$exeFilePath"
ArgumentList = "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART"
PassThru = $true
Wait = $true
}
# Start process and track exit code
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
# Prints the exit code
Write-Host "Install exit code: $exitCode"
Exit $exitCode
} catch {
Write-Host "Error: $_"
Exit 1
}
@@ -0,0 +1,92 @@
# Fleet extracts name from installer (EXE) and saves it to PACKAGE_ID
# variable
# For 010 Editor, we match against DisplayName "010 Editor" which appears in registry
$softwareName = "010 Editor"
# It is recommended to use exact software name here if possible to avoid
# uninstalling unintended software.
$softwareNameLike = "*$softwareName*"
# Inno Setup installers require /VERYSILENT flag for silent uninstall
$uninstallArgs = "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART"
$machineKey = `
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
$machineKey32on64 = `
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
$exitCode = 0
try {
[array]$uninstallKeys = Get-ChildItem `
-Path @($machineKey, $machineKey32on64) `
-ErrorAction SilentlyContinue |
ForEach-Object { Get-ItemProperty $_.PSPath }
$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
}
# The uninstall command may contain command and args, like:
# "C:\Program Files\Software\uninstall.exe" /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"
}
# Start process and track 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."
# Change exit code to 0 if you don't want to fail if uninstaller is not
# found. This could happen if program was already uninstalled.
$exitCode = 1
}
} catch {
Write-Host "Error: $_"
$exitCode = 1
}
Exit $exitCode
@@ -0,0 +1,21 @@
{
"versions": [
{
"version": "16.0.2",
"queries": {
"exists": "SELECT 1 FROM programs WHERE name = '010 Editor 16.0.2 (64-bit)' AND publisher = 'SweetScape Software';"
},
"installer_url": "https://download.sweetscape.com/010EditorWin64Installer16.0.2.exe",
"install_script_ref": "5764f801",
"uninstall_script_ref": "07227ac7",
"sha256": "c092a1308c583234cd8065e666fc86c1d0d4b7182e76b27922d513d54eca41d0",
"default_categories": [
"Developer tools"
]
}
],
"refs": {
"07227ac7": "# Fleet extracts name from installer (EXE) and saves it to PACKAGE_ID\n# variable\n# For 010 Editor, we match against DisplayName \"010 Editor\" which appears in registry\n$softwareName = \"010 Editor\"\n\n# It is recommended to use exact software name here if possible to avoid\n# uninstalling unintended software.\n$softwareNameLike = \"*$softwareName*\"\n\n# Inno Setup installers require /VERYSILENT flag for silent uninstall\n$uninstallArgs = \"/VERYSILENT /SUPPRESSMSGBOXES /NORESTART\"\n\n$machineKey = `\n 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n$machineKey32on64 = `\n 'HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n\n$exitCode = 0\n\ntry {\n\n[array]$uninstallKeys = Get-ChildItem `\n -Path @($machineKey, $machineKey32on64) `\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\" /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 process and track 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 # Change exit code to 0 if you don't want to fail if uninstaller is not\n # found. This could happen if program was already uninstalled.\n $exitCode = 1\n}\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n}\n\nExit $exitCode\n\n",
"5764f801": "# 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 arguments to install silently (010 Editor uses an Inno Setup-based installer)\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"/VERYSILENT /SUPPRESSMSGBOXES /NORESTART\"\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\n"
}
}
+7
View File
@@ -8,6 +8,13 @@
"unique_identifier": "com.SweetScape.010Editor",
"description": "010 Editor is a toolkit for working with text and binary data."
},
{
"name": "010 Editor",
"slug": "010-editor/windows",
"platform": "windows",
"unique_identifier": "010 Editor 16.0.2 (64-bit)",
"description": "010 Editor is a toolkit for working with text and binary data."
},
{
"name": "1Password",
"slug": "1password/darwin",