This is another of those, ‘a customer asked for a solution and a I wrote a script that I want to share’ posts.
One of our customers wanted Adobe CS6 Master Collection deployed out, but didn’t like all the ‘gubbins’ that got installed too, like the uninstaller shortcuts and the pre-sets folders. I didn’t want to just gut these as they might be needed later on, for example to troubleshoot an issue.
The Solution
Instead, I made use of the ‘chflags hidden’ command and flag to hide the items from the GUI and to clean up the applications folder somewhat.
The end result was a bash script just shy of 150 lines (with some comments) to complete the task that hides the following items from the GUI:
- “/Applications/Adobe”
- “/Applications/Adobe Acrobat X Pro/Acrobat X Uninstaller”
- “/Applications/Adobe After Effects CS6/aerender”
- “/Applications/Adobe After Effects CS6/Legal”
- “/Applications/Adobe After Effects CS6/Plug-ins”
- “/Applications/Adobe After Effects CS6/Presets”
- “/Applications/Adobe After Effects CS6/Scripts”
- “/Applications/Adobe After Effects CS6/Uninstall Adobe After Effects CS6”
- “/Applications/Adobe Audition CS6/Legal”
- “/Applications/Adobe Audition CS6/Uninstall Adobe Audition CS6”
- “/Applications/Adobe Bridge CS6/Legal”
- “/Applications/Adobe Bridge CS6/Plug-Ins”
- “/Applications/Adobe Bridge CS6/Presets”
- “/Applications/Adobe Bridge CS6/Required”
- “/Applications/Adobe Dreamweaver CS6/Configuration”
- “/Applications/Adobe Dreamweaver CS6/en_US”
- “/Applications/Adobe Dreamweaver CS6/Installer”
- “/Applications/Adobe Dreamweaver CS6/Legal”
- “/Applications/Adobe Dreamweaver CS6/Sample_files”
- “/Applications/Adobe Dreamweaver CS6/Uninstall Adobe Dreamweaver CS6”
- “/Applications/Adobe Encore CS6/Legal”
- “/Applications/Adobe Encore CS6/Uninstall Adobe Encore CS6”
- “/Applications/Adobe Extension Manager CS6/Legal”
- “/Applications/Adobe Extension Manager CS6/Resources”
- “/Applications/Adobe Fireworks CS6/bridgeDefaultLanguage”
- “/Applications/Adobe Fireworks CS6/Configuration”
- “/Applications/Adobe Fireworks CS6/Legal”
- “/Applications/Adobe Fireworks CS6/Required”
- “/Applications/Adobe Fireworks CS6/Uninstall Adobe Fireworks CS6”
- “/Applications/Adobe Flash Builder 4.6/Adobe Flash Builder 4.6 – Bitte lesen.pdf”
- “/Applications/Adobe Flash Builder 4.6/Adobe Flash Builder 4.6 — Lisez-moi.pdf”
- “/Applications/Adobe Flash Builder 4.6/Adobe Flash Builder 4.6 Read Me.pdf”
- “/Applications/Adobe Flash Builder 4.6/Adobe Flash Builder 4.6 お読みください.pdf”
- “/Applications/Adobe Flash Builder 4.6/Adobe Flash Builder 4.6 自述.pdf”
- “/Applications/Adobe Flash Builder 4.6/assets”
- “/Applications/Adobe Flash Builder 4.6/configuration”
- “/Applications/Adobe Flash Builder 4.6/dropins”
- “/Applications/Adobe Flash Builder 4.6/eclipse”
- “/Applications/Adobe Flash Builder 4.6/Legal”
- “/Applications/Adobe Flash Builder 4.6/p2”
- “/Applications/Adobe Flash Builder 4.6/player”
- “/Applications/Adobe Flash Builder 4.6/sdks”
- “/Applications/Adobe Flash Builder 4.6/utilities”
- “/Applications/Adobe Flash Builder 4.6/Важное о Adobe Flash Builder 4.6.pdf”
- “/Applications/Adobe Flash Builder 4.6/Uninstall Adobe Flash Builder 4.6”
- “/Applications/Adobe Flash CS6/AIR3.2”
- “/Applications/Adobe Flash CS6/AIR3.4”
- “/Applications/Adobe Flash CS6/Common”
- “/Applications/Adobe Flash CS6/en_US”
- “/Applications/Adobe Flash CS6/Legal”
- “/Applications/Adobe Flash CS6/Players”
- “/Applications/Adobe Flash CS6/XManConfig.xml”
- “/Applications/Adobe Flash CS6/Uninstall Adobe Flash CS6”
- “/Applications/Adobe Illustrator CS6/Configuration”
- “/Applications/Adobe Illustrator CS6/Cool Extras.localized”
- “/Applications/Adobe Illustrator CS6/Legal”
- “/Applications/Adobe Illustrator CS6/Plug-ins.localized”
- “/Applications/Adobe Illustrator CS6/Presets.localized”
- “/Applications/Adobe Illustrator CS6/Read Me.localized”
- “/Applications/Adobe Illustrator CS6/Scripting.localized”
- “/Applications/Adobe Illustrator CS6/Uninstall Adobe Illustrator CS6”
- “/Applications/Adobe InDesign CS6/Configuration”
- “/Applications/Adobe InDesign CS6/Documentation”
- “/Applications/Adobe InDesign CS6/Fonts”
- “/Applications/Adobe InDesign CS6/Legal”
- “/Applications/Adobe InDesign CS6/Plug-Ins”
- “/Applications/Adobe InDesign CS6/Presets”
- “/Applications/Adobe InDesign CS6/Scripts”
- “/Applications/Adobe InDesign CS6/Uninstall Adobe InDesign CS6”
- “/Applications/Adobe Media Encoder CS6/Configuration”
- “/Applications/Adobe Photoshop CS6/Configuration”
- “/Applications/Adobe Photoshop CS6/Legal”
- “/Applications/Adobe Photoshop CS6/LegalNotices.pdf”
- “/Applications/Adobe Photoshop CS6/Locales”
- “/Applications/Adobe Photoshop CS6/Photoshop CS6 Read Me.pdf”
- “/Applications/Adobe Photoshop CS6/Plug-ins”
- “/Applications/Adobe Photoshop CS6/Presets”
- “/Applications/Adobe Photoshop CS6/Uninstall Adobe Photoshop CS6”
- “/Applications/Adobe Prelude CS6/Configuration”
- “/Applications/Adobe Prelude CS6/Uninstall Adobe Prelude CS6”
- “/Applications/Adobe Premiere Pro CS6/Configuration”
- “/Applications/Adobe Premiere Pro CS6/Presets”
- “/Applications/Adobe Premiere Pro CS6/Uninstall Adobe Premiere Pro CS6”
- “/Applications/Adobe SpeedGrade CS6/Uninstall Adobe SpeedGrade CS6”
- “/Applications/Utilities/Adobe Application Manager”
- “/Applications/Utilities/Adobe Installers”
- “/Applications/Utilities/Adobe Utilities-CS6.localized/ExtendScript Toolkit CS6/ExtendScript Toolkit ReadMe.pdf”
- “/Applications/Utilities/Adobe Utilities-CS6.localized/ExtendScript Toolkit CS6/Legal”
- “/Applications/Utilities/Adobe Utilities-CS6.localized/ExtendScript Toolkit CS6/SDK”
- “/Applications/Utilities/Adobe Flash Player Install Manager.app”
The exception to this is the Acrobat Pro X uninstaller (“/Applications/Adobe Acrobat X Pro/Acrobat X Uninstaller”) that I couldn’t hide, so instead the script will remove this.
The Script
Rather than paste out the entire script we have added this to our public github repo. The script can be pulled from here.
Before you ask, no I didn’t manually write out all of those paths! Instead I selected all the items I wanted, dragged these into Text Wrangler whilst holding down the “cmd” key (to drag in the paths and not the objects themselves), then utilised the prefix / suffix options in Text Wranger to add “chflags hidden” to each line. I did have to go through and complete some clean up and comments but otherwise that was the bulk of the work completed in a matter of minutes.
Alternative methods
As with most things, there are many ways to skin a cat, there are also many ways to script something like this, including:
- Making use of a function to accept each file path, run some error checking and carry out the hiding.
a. I didn’t use this as the methods I used were sufficient for my needs. - Not bothering at all.
a. This was an option, however seeing how clean the Applications folder looked afterwards made it worthwhile. - Use another / better scripting language.
a. I know bash / shell scripting well enough to be happy using over alternatives at the moment.
Summary
And that’s another possibly helpful script added for your use. Please feel free to test out, and tweak as much as you wish, just please ensure to run on test systems first to be 100% happy that it works in your environment.
As always, if you have any questions, queries or comments, let us know below and I’ll try to respond to and delve into as many as I can.