Add Box Tools Fleet-maintained app for Windows and macOS (#49779)
**Related issue:** Resolves #49738 Adds **Box Tools** as a Fleet-maintained app for **Windows** (winget `Box.BoxTools`) and **macOS** (Homebrew cask `box-tools`). ## Windows details (verified against the real installer) - Installer: `BoxToolsInstaller-AdminInstall.msi` (machine-wide admin MSI, `ALLUSERS=1`), x64. - MSI Property table verified with msitools: `ProductName` = `Box Tools`, `Manufacturer` = `Box`, `ProductVersion` = `4.32.0.1324` — all match the winget manifest, so `unique_identifier: "Box Tools"` and the generated exists query (`name = 'Box Tools' AND publisher = 'Box'`) match what osquery reports from the registry. No `program_publisher` override needed. - The winget manifest has no `Scope`, so `installer_scope: "machine"` is set in the input (confirmed by `ALLUSERS=1`). - ProductCode/UpgradeCode match the manifest; standard auto-generated machine-MSI install + upgrade-code uninstall scripts. - Downloaded SHA256 matches the manifest SHA (`9f5958...c5066`). - No sibling-name collision with the existing Box Drive FMA (its DisplayName is `Box`; matching is exact). ## macOS details Box Tools on macOS is **per-user only**: the cask installs the app bundles to `~/Library/Application Support/Box/Box Edit/`, Box's admin `.pkg` forbids the local system domain (`enable_localSystem="false"`), and [Box's large-scale deployment docs](https://support.box.com/hc/en-us/articles/360043695834-Large-Scale-Deployments-Box-Tools) instruct running the installer as the console user (multi-user Macs are not a supported configuration). Because the install location is outside osquery's `apps` directory scan paths, detection relies on osquery's LaunchServices enumeration (`_LSCopyAllApplicationURLs` in `genApps`), which surfaces the bundles regardless of location — verified against a live install where all four Box Tools bundles are LaunchServices-registered at the per-user path and appear in the `apps` table. - `unique_identifier: com.Box.Box-Edit` (verified `CFBundleIdentifier` of `Box Edit.app` in the DMG). - **Custom install script** (the cask's app artifacts are all `target:`-style, which the script generator skips, so the auto-generated script would be a no-op): resolves the console user (falling back to `lastUserName` when run while logged out), quits the Box apps, copies the four app bundles from the DMG's `Install Box Tools.app/Contents/Resources/` into the user's `~/Library/Application Support/Box/Box Edit/` (replicating the cask/pkg payload exactly), chowns them, and registers them with LaunchServices in both root and user contexts so inventory and box.com pick them up without a first manual launch. - **Custom uninstall script**: quits/kills the Box Tools processes and removes `Box Edit` from every local user's home. The parent `Box` directory is shared with Box Drive, so it is only removed if left empty. - The cask uses `sha256 :no_check` (rolling `currentrelease` URL) — the established FMA convention for such casks (same as Google Chrome/VS Code darwin); the server pins the hash of what it downloads at add time. - Cask version is `4.32` while `CFBundleShortVersionString` is `4.32.0`; the validator's prefix matching and the patched query's `version_compare` both treat these as consistent. ## Shared caveat ⚠️ Both installer URLs are rolling `currentrelease` links. On Windows the pinned SHA will drift when Box ships a new build until the FMA auto-update ingests the new manifest; macOS uses `no_check` per the cask. ## Icon Generated from the official 512×512 Box Tools icon shipped inside the vendor DMG via `tools/software/icons/generate-icons.sh` (frontend `BoxTools.tsx` + map entry, website `app-icon-box-tools-60x60@2x.png`). Both platforms share the icon via the common `name`/slug. # Checklist for submitter - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. ## Testing - [x] Verified installer identity fields (MSI Property table, Info.plist bundle identifiers/versions) with msitools/PlistBuddy against the live installers; Windows output SHA matches the winget manifest. - [x] Verified on a live macOS install that the per-user Box Tools bundles are LaunchServices-registered and visible to osquery's `apps` table. - [ ] FMA validation CI (Windows + macOS runners) to confirm install/uninstall/detection. - [ ] QA'd all new/changed functionality manually <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Box Tools support for both Windows and macOS. * Added Box Tools install, upgrade, and uninstall handling for the maintained app catalog. * Published Box Tools metadata to the software catalog (including platform-specific entries and version targeting). * Added a Box Tools icon to the software interface for improved name matching. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Box Tools",
|
||||
"slug": "box-tools/darwin",
|
||||
"unique_identifier": "com.Box.Box-Edit",
|
||||
"token": "box-tools",
|
||||
"installer_format": "dmg",
|
||||
"default_categories": ["Productivity"],
|
||||
"install_script_path": "ee/maintained-apps/inputs/homebrew/scripts/box-tools-install.sh",
|
||||
"uninstall_script_path": "ee/maintained-apps/inputs/homebrew/scripts/box-tools-uninstall.sh"
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Box Tools is a per-user application: Box only supports installing it into a
|
||||
# user's home directory (~/Library/Application Support/Box/Box Edit). Its admin
|
||||
# .pkg forbids the local system domain (enable_localSystem="false") and Box's
|
||||
# large-scale deployment docs instruct running the installer as the console
|
||||
# user. This script replicates the Homebrew cask install: it copies the app
|
||||
# bundles out of the DMG's "Install Box Tools.app" into the console user's
|
||||
# home, then registers them with LaunchServices so osquery's apps table (which
|
||||
# enumerates LaunchServices) and the box.com web app can find them.
|
||||
|
||||
quit_application() {
|
||||
local bundle_id="$1"
|
||||
local timeout_duration=10
|
||||
|
||||
# check if the application is running
|
||||
local app_running
|
||||
app_running=$(osascript -e "application id \"$bundle_id\" is running" 2>/dev/null)
|
||||
if [[ "$app_running" != "true" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local console_user
|
||||
console_user=$(stat -f "%Su" /dev/console)
|
||||
if [[ -z "$console_user" || "$console_user" == "root" || "$console_user" == "loginwindow" ]]; then
|
||||
echo "Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'."
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Quitting application '$bundle_id'..."
|
||||
|
||||
# try to quit the application within the timeout period
|
||||
local quit_success=false
|
||||
SECONDS=0
|
||||
while (( SECONDS < timeout_duration )); do
|
||||
if osascript -e "tell application id \"$bundle_id\" to quit" >/dev/null 2>&1; then
|
||||
if ! pgrep -f "$bundle_id" >/dev/null 2>&1; then
|
||||
echo "Application '$bundle_id' quit successfully."
|
||||
quit_success=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [[ "$quit_success" = false ]]; then
|
||||
echo "Application '$bundle_id' did not quit."
|
||||
fi
|
||||
}
|
||||
|
||||
[[ -n "$INSTALLER_PATH" && -f "$INSTALLER_PATH" ]] || { echo "missing installer"; exit 1; }
|
||||
|
||||
target_user=$(stat -f "%Su" /dev/console)
|
||||
if [[ -z "$target_user" || "$target_user" == "root" || "$target_user" == "loginwindow" || "$target_user" == "_mbsetupuser" ]]; then
|
||||
# No GUI session (e.g. install triggered while logged out): fall back to the
|
||||
# last user that logged in. Box only supports Box Tools on single-user Macs,
|
||||
# so this is unambiguous in the supported configuration.
|
||||
target_user=$(defaults read /Library/Preferences/com.apple.loginwindow lastUserName 2>/dev/null)
|
||||
fi
|
||||
if [[ -z "$target_user" || "$target_user" == "root" ]] || ! id -u "$target_user" >/dev/null 2>&1; then
|
||||
echo "Box Tools installs per-user; no logged-in (or last logged-in) user found."
|
||||
exit 1
|
||||
fi
|
||||
target_uid=$(id -u "$target_user")
|
||||
|
||||
user_home=$(dscl . -read "/Users/$target_user" NFSHomeDirectory 2>/dev/null | sed 's/^NFSHomeDirectory: //')
|
||||
[[ -n "$user_home" ]] || user_home="/Users/$target_user"
|
||||
[[ -d "$user_home" ]] || { echo "home directory for $target_user not found"; exit 1; }
|
||||
|
||||
quit_application "com.Box.Box-Edit"
|
||||
quit_application "com.box.Box-Local-Com-Server"
|
||||
|
||||
MOUNT_POINT="$(mktemp -d /tmp/box-tools-dmg.XXXXXX)"
|
||||
hdiutil attach -nobrowse -readonly -mountpoint "$MOUNT_POINT" "$INSTALLER_PATH" >/dev/null || { echo "failed to mount dmg"; exit 1; }
|
||||
|
||||
RESOURCES="$MOUNT_POINT/Install Box Tools.app/Contents/Resources"
|
||||
BOX_DIR="$user_home/Library/Application Support/Box"
|
||||
DEST="$BOX_DIR/Box Edit"
|
||||
mkdir -p "$DEST"
|
||||
|
||||
status=0
|
||||
for app in "Box Edit.app" "Box Device Trust.app" "Box Local Com Server.app" "Box Tools Custom Apps.app"; do
|
||||
if [[ -d "$RESOURCES/$app" ]]; then
|
||||
rm -rf "${DEST:?}/$app"
|
||||
if ! ditto "$RESOURCES/$app" "$DEST/$app"; then
|
||||
echo "failed to copy $app"
|
||||
status=1
|
||||
fi
|
||||
else
|
||||
echo "$app not found in installer"
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
# The parent Box directory is shared with other Box products (e.g. Box Drive)
|
||||
# that run as the same user, so owning it (non-recursively) is safe.
|
||||
chown -R "$target_user":staff "$DEST"
|
||||
chown "$target_user":staff "$BOX_DIR"
|
||||
|
||||
hdiutil detach "$MOUNT_POINT" >/dev/null 2>&1 || true
|
||||
rmdir "$MOUNT_POINT" >/dev/null 2>&1 || true
|
||||
|
||||
[[ $status -eq 0 ]] || exit "$status"
|
||||
|
||||
# Register the copied bundles with LaunchServices in both the root context
|
||||
# (osqueryd runs as root and its apps table enumerates LaunchServices) and the
|
||||
# user's context (so box.com can launch Box Edit without a first manual launch).
|
||||
LSREGISTER="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister"
|
||||
for app in "Box Edit.app" "Box Device Trust.app" "Box Local Com Server.app" "Box Tools Custom Apps.app"; do
|
||||
"$LSREGISTER" -f "$DEST/$app" >/dev/null 2>&1 || true
|
||||
/bin/launchctl asuser "$target_uid" sudo -u "$target_user" "$LSREGISTER" -f "$DEST/$app" >/dev/null 2>&1 || true
|
||||
done
|
||||
|
||||
echo "Box Tools installed for user $target_user"
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Box Tools installs per-user (~/Library/Application Support/Box/Box Edit), so
|
||||
# remove it from every local user's home. The parent Box directory is shared
|
||||
# with other Box products (e.g. Box Drive), so only the Box Edit subdirectory
|
||||
# is removed; the parent is removed only if it is left empty.
|
||||
|
||||
quit_application() {
|
||||
local bundle_id="$1"
|
||||
local timeout_duration=10
|
||||
|
||||
# check if the application is running
|
||||
local app_running
|
||||
app_running=$(osascript -e "application id \"$bundle_id\" is running" 2>/dev/null)
|
||||
if [[ "$app_running" != "true" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local console_user
|
||||
console_user=$(stat -f "%Su" /dev/console)
|
||||
if [[ -z "$console_user" || "$console_user" == "root" || "$console_user" == "loginwindow" ]]; then
|
||||
echo "Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'."
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Quitting application '$bundle_id'..."
|
||||
|
||||
# try to quit the application within the timeout period
|
||||
local quit_success=false
|
||||
SECONDS=0
|
||||
while (( SECONDS < timeout_duration )); do
|
||||
if osascript -e "tell application id \"$bundle_id\" to quit" >/dev/null 2>&1; then
|
||||
if ! pgrep -f "$bundle_id" >/dev/null 2>&1; then
|
||||
echo "Application '$bundle_id' quit successfully."
|
||||
quit_success=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [[ "$quit_success" = false ]]; then
|
||||
echo "Application '$bundle_id' did not quit."
|
||||
fi
|
||||
}
|
||||
|
||||
quit_application "com.Box.Box-Edit"
|
||||
quit_application "com.box.Box-Local-Com-Server"
|
||||
|
||||
# Box's background helpers may keep running after a quit attempt (they are
|
||||
# faceless agents in the user's session); kill any leftovers so the app files
|
||||
# can be removed cleanly.
|
||||
pkill -f "Box Edit.app/Contents/MacOS" >/dev/null 2>&1 || true
|
||||
pkill -f "Box Local Com Server.app/Contents/MacOS" >/dev/null 2>&1 || true
|
||||
pkill -f "Box Device Trust.app/Contents/MacOS" >/dev/null 2>&1 || true
|
||||
pkill -f "Box Tools Custom Apps.app/Contents/MacOS" >/dev/null 2>&1 || true
|
||||
|
||||
removed=false
|
||||
for udir in /Users/* /var/root; do
|
||||
box_edit_dir="$udir/Library/Application Support/Box/Box Edit"
|
||||
[[ -d "$box_edit_dir" ]] || continue
|
||||
echo "removing $box_edit_dir"
|
||||
rm -rf "$box_edit_dir" || true
|
||||
rmdir "$udir/Library/Application Support/Box" >/dev/null 2>&1 || true
|
||||
removed=true
|
||||
done
|
||||
|
||||
if [[ "$removed" = false ]]; then
|
||||
echo "Box Tools was not found in any user's home directory."
|
||||
fi
|
||||
|
||||
echo "Box Tools uninstalled"
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Box Tools",
|
||||
"slug": "box-tools/windows",
|
||||
"package_identifier": "Box.BoxTools",
|
||||
"unique_identifier": "Box Tools",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "msi",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": ["Productivity"]
|
||||
}
|
||||
@@ -1268,6 +1268,20 @@
|
||||
"unique_identifier": "Box",
|
||||
"description": "Box Drive is the desktop client for Box Cloud, enabling seamless access to your files without taking up local storage."
|
||||
},
|
||||
{
|
||||
"name": "Box Tools",
|
||||
"slug": "box-tools/darwin",
|
||||
"platform": "darwin",
|
||||
"unique_identifier": "com.Box.Box-Edit",
|
||||
"description": "Box Tools is a companion app for Box that lets users create and edit files stored in Box with their computer's default applications, directly from a web browser."
|
||||
},
|
||||
{
|
||||
"name": "Box Tools",
|
||||
"slug": "box-tools/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Box Tools",
|
||||
"description": "Box Tools is a companion app for Box that lets users create and edit files stored in Box with their computer's default applications, directly from a web browser."
|
||||
},
|
||||
{
|
||||
"name": "Brave",
|
||||
"slug": "brave-browser/darwin",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "4.32",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.Box.Box-Edit';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.Box.Box-Edit' AND version_compare(bundle_short_version, '4.32') < 0);"
|
||||
},
|
||||
"installer_url": "https://e3.boxcdn.net/box-installers/boxedit/mac/currentrelease/BoxToolsInstaller.dmg",
|
||||
"install_script_ref": "8edf7fac",
|
||||
"uninstall_script_ref": "106fea69",
|
||||
"sha256": "no_check",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"106fea69": "#!/bin/bash\n\n# Box Tools installs per-user (~/Library/Application Support/Box/Box Edit), so\n# remove it from every local user's home. The parent Box directory is shared\n# with other Box products (e.g. Box Drive), so only the Box Edit subdirectory\n# is removed; the parent is removed only if it is left empty.\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n local app_running\n app_running=$(osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null)\n if [[ \"$app_running\" != \"true\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; 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 < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; 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\nquit_application \"com.Box.Box-Edit\"\nquit_application \"com.box.Box-Local-Com-Server\"\n\n# Box's background helpers may keep running after a quit attempt (they are\n# faceless agents in the user's session); kill any leftovers so the app files\n# can be removed cleanly.\npkill -f \"Box Edit.app/Contents/MacOS\" >/dev/null 2>&1 || true\npkill -f \"Box Local Com Server.app/Contents/MacOS\" >/dev/null 2>&1 || true\npkill -f \"Box Device Trust.app/Contents/MacOS\" >/dev/null 2>&1 || true\npkill -f \"Box Tools Custom Apps.app/Contents/MacOS\" >/dev/null 2>&1 || true\n\nremoved=false\nfor udir in /Users/* /var/root; do\n box_edit_dir=\"$udir/Library/Application Support/Box/Box Edit\"\n [[ -d \"$box_edit_dir\" ]] || continue\n echo \"removing $box_edit_dir\"\n rm -rf \"$box_edit_dir\" || true\n rmdir \"$udir/Library/Application Support/Box\" >/dev/null 2>&1 || true\n removed=true\ndone\n\nif [[ \"$removed\" = false ]]; then\n echo \"Box Tools was not found in any user's home directory.\"\nfi\n\necho \"Box Tools uninstalled\"\n",
|
||||
"8edf7fac": "#!/bin/bash\n\n# Box Tools is a per-user application: Box only supports installing it into a\n# user's home directory (~/Library/Application Support/Box/Box Edit). Its admin\n# .pkg forbids the local system domain (enable_localSystem=\"false\") and Box's\n# large-scale deployment docs instruct running the installer as the console\n# user. This script replicates the Homebrew cask install: it copies the app\n# bundles out of the DMG's \"Install Box Tools.app\" into the console user's\n# home, then registers them with LaunchServices so osquery's apps table (which\n# enumerates LaunchServices) and the box.com web app can find them.\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n local app_running\n app_running=$(osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null)\n if [[ \"$app_running\" != \"true\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; 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 < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; 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[[ -n \"$INSTALLER_PATH\" && -f \"$INSTALLER_PATH\" ]] || { echo \"missing installer\"; exit 1; }\n\ntarget_user=$(stat -f \"%Su\" /dev/console)\nif [[ -z \"$target_user\" || \"$target_user\" == \"root\" || \"$target_user\" == \"loginwindow\" || \"$target_user\" == \"_mbsetupuser\" ]]; then\n # No GUI session (e.g. install triggered while logged out): fall back to the\n # last user that logged in. Box only supports Box Tools on single-user Macs,\n # so this is unambiguous in the supported configuration.\n target_user=$(defaults read /Library/Preferences/com.apple.loginwindow lastUserName 2>/dev/null)\nfi\nif [[ -z \"$target_user\" || \"$target_user\" == \"root\" ]] || ! id -u \"$target_user\" >/dev/null 2>&1; then\n echo \"Box Tools installs per-user; no logged-in (or last logged-in) user found.\"\n exit 1\nfi\ntarget_uid=$(id -u \"$target_user\")\n\nuser_home=$(dscl . -read \"/Users/$target_user\" NFSHomeDirectory 2>/dev/null | sed 's/^NFSHomeDirectory: //')\n[[ -n \"$user_home\" ]] || user_home=\"/Users/$target_user\"\n[[ -d \"$user_home\" ]] || { echo \"home directory for $target_user not found\"; exit 1; }\n\nquit_application \"com.Box.Box-Edit\"\nquit_application \"com.box.Box-Local-Com-Server\"\n\nMOUNT_POINT=\"$(mktemp -d /tmp/box-tools-dmg.XXXXXX)\"\nhdiutil attach -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\" >/dev/null || { echo \"failed to mount dmg\"; exit 1; }\n\nRESOURCES=\"$MOUNT_POINT/Install Box Tools.app/Contents/Resources\"\nBOX_DIR=\"$user_home/Library/Application Support/Box\"\nDEST=\"$BOX_DIR/Box Edit\"\nmkdir -p \"$DEST\"\n\nstatus=0\nfor app in \"Box Edit.app\" \"Box Device Trust.app\" \"Box Local Com Server.app\" \"Box Tools Custom Apps.app\"; do\n if [[ -d \"$RESOURCES/$app\" ]]; then\n rm -rf \"${DEST:?}/$app\"\n if ! ditto \"$RESOURCES/$app\" \"$DEST/$app\"; then\n echo \"failed to copy $app\"\n status=1\n fi\n else\n echo \"$app not found in installer\"\n status=1\n fi\ndone\n\n# The parent Box directory is shared with other Box products (e.g. Box Drive)\n# that run as the same user, so owning it (non-recursively) is safe.\nchown -R \"$target_user\":staff \"$DEST\"\nchown \"$target_user\":staff \"$BOX_DIR\"\n\nhdiutil detach \"$MOUNT_POINT\" >/dev/null 2>&1 || true\nrmdir \"$MOUNT_POINT\" >/dev/null 2>&1 || true\n\n[[ $status -eq 0 ]] || exit \"$status\"\n\n# Register the copied bundles with LaunchServices in both the root context\n# (osqueryd runs as root and its apps table enumerates LaunchServices) and the\n# user's context (so box.com can launch Box Edit without a first manual launch).\nLSREGISTER=\"/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister\"\nfor app in \"Box Edit.app\" \"Box Device Trust.app\" \"Box Local Com Server.app\" \"Box Tools Custom Apps.app\"; do\n \"$LSREGISTER\" -f \"$DEST/$app\" >/dev/null 2>&1 || true\n /bin/launchctl asuser \"$target_uid\" sudo -u \"$target_user\" \"$LSREGISTER\" -f \"$DEST/$app\" >/dev/null 2>&1 || true\ndone\n\necho \"Box Tools installed for user $target_user\"\n"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "4.32.0.1324",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'Box Tools' AND publisher = 'Box';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Box Tools' AND publisher = 'Box' AND version_compare(version, '4.32.0.1324') < 0);"
|
||||
},
|
||||
"installer_url": "https://e3.boxcdn.net/box-installers/boxedit/win/currentrelease/BoxToolsInstaller-AdminInstall.msi",
|
||||
"install_script_ref": "8959087b",
|
||||
"uninstall_script_ref": "27915223",
|
||||
"sha256": "9f59584911be7cf4c28b923154f02dd2b6d6fd8b67f14ddd7f708591c96c5066",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
],
|
||||
"upgrade_code": "{BA743183-92C2-4F8F-B27E-B7822CAD2095}"
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"27915223": "# Fleet uninstalls app by finding all related product codes for the specified upgrade code\n$inst = New-Object -ComObject \"WindowsInstaller.Installer\"\n$timeoutSeconds = 300 # 5 minute timeout per product\n\n# MSI exit codes that indicate success. 3010 = ERROR_SUCCESS_REBOOT_REQUIRED,\n# 1641 = ERROR_SUCCESS_REBOOT_INITIATED. Treat these as success rather than failure.\n$successCodes = @(0, 3010, 1641)\n\nforeach ($product_code in $inst.RelatedProducts('{BA743183-92C2-4F8F-B27E-B7822CAD2095}')) {\n $process = Start-Process msiexec -ArgumentList @(\"/quiet\", \"/x\", $product_code, \"/norestart\") -PassThru\n\n # Wait for process with timeout\n $completed = $process.WaitForExit($timeoutSeconds * 1000)\n\n if (-not $completed) {\n Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue\n Exit 1603 # ERROR_UNINSTALL_FAILURE\n }\n\n # If the uninstall failed, bail\n if ($successCodes -notcontains $process.ExitCode) {\n Write-Output \"Uninstall for $($product_code) exited $($process.ExitCode)\"\n Exit $process.ExitCode\n }\n}\n\n# All uninstalls succeeded; exit success\nExit 0\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"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -141,6 +141,7 @@ import Boom3D from "./Boom3D";
|
||||
import Boop from "./Boop";
|
||||
import BoostNote from "./BoostNote";
|
||||
import Box from "./Box";
|
||||
import BoxTools from "./BoxTools";
|
||||
import Brave from "./Brave";
|
||||
import Breaktimer from "./Breaktimer";
|
||||
import BricklinkStudio from "./BricklinkStudio";
|
||||
@@ -1268,6 +1269,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
boop: Boop,
|
||||
"boost note": BoostNote,
|
||||
box: Box,
|
||||
"box tools": BoxTools,
|
||||
brave: Brave,
|
||||
breaktimer: Breaktimer,
|
||||
"bricklink studio": BricklinkStudio,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user