Category filter
Script to fetch Google Chrome extensions installed on Mac
Organizations consider Google Chrome a necessary utility that improves users’ browsing experience. However, as an administrator, if you want to exert more control over the Chrome browser and determine the extensions installed on the macOS devices, you can get it done quickly with the help of scripts. The Execute Custom Script action enables you to execute customized scripts for performing necessary operations tailored for your needs.
Get the list of extensions
Like every app, browser extensions also have a unique ID associated with them, where each extension ID is 32 characters long. The following scripts fetch the complete list of extension IDs installed on the devices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/bash currentUser=`ls -l /dev/console | cut -d " " -f 4` ext_dir="/Users/$currentUser/Library/Application Support/Google/Chrome/Default/Extensions/" for i in $(find "$ext_dir" -name 'manifest.json'); do # n=$(grep -hIr name $i| cut -f4 -d '"'| sort) # u="https://chrome.google.com/extensions/detail/" ue=$(basename $(dirname $(dirname $i))) echo "$ue,$n:\n$update\n" Done |
Find if a given extension is installed on Mac
The following scripts help you to determine if a specific extension is installed on Mac. You can search for a given extension on the device using its extension ID.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/bin/sh currentUser=`ls -l /dev/console | cut -d " " -f 4` if [ -d "/Users/$currentUser/Library/Application Support/Google/Chrome/Default/Extensions/extension_ID" ] ; then STATUS="The given extension is installed." else STATUS="Not installed." fi echo "<result>$STATUS</result>" |
To obtain the extension ID,
- Open Google Chrome on the device.
- Type in chrome://extensions on the search tab. It lists all the extensions installed on the device.
- Click on the Details button corresponding to the required extension. It appends the extension ID in the search bar.