Software

Clearing Font Caches

Wrote up a handy script to clear all the font caches for the Mac OS, Adobe, MIcrosoft Office and Apple iWorks.

I am using this in Casper, so I have it running as root and having a reboot happen after.  If you are going to run this on your own, you may want to put a root check in there and make sure to reboot after.

#!/bin/bash
## Author: C. Tangora
## Purpose: Remove Font Cache from Adobe, Microsoft, iWork and Mac OS.
## If run outside of Casper, be sure to be root & reboot after.

## Adobe Font Caches are stored in the User's Libraries, and will have "Fnt" in the name and end in ".lst".
echo "Removing Adobe Font Caches (Lists)"
find -x /Users -mindepth 5 -type f -iname *Fnt*.lst -delete
sleep 1

## Next it will remove the font caches from Microsoft Office.
echo "Removing Office Font Caches"
find -x /Users -mindepth 7 -type f -name *Office\ Font\ Cache* -delete
sleep 1

## iWorks is next on the chopping block
echo "Removing iWork Font Caches"
find -x /Users -type f -name com.apple.iwork.fonts -delete
sleep 1

## Next we will restart the Apple Type Server.
# This is the one we want to make sure we reboot (or at least logout) to restart.
echo "Removing OS Font Caches"
atsutil databases -remove
sleep 1

echo "Restarting Apple Type Service Server"
atsutil server -shutdown
atsutil server -ping
sleep 1
echo "Completed Font Clearing."
echo "Please restart ASAP."

exit 0
’till next time

How to Remove Symantec Endpoint Protection 11 (SEP11) with the Casper Suite

Symantec Endpoint Protection 11’s removal is never perfect, few software titles are when you remove or install at the Enterprise level, there’s always a need for further testing and refining.  At the current time I have come up with this method for removing Symantec Endpoint Protection and it seems to work fair enough.  There may be a better way, but this way works for my purpose.

First go to Symantec’s Mac Removal page and download the SymantecRemovalTool from the bottom of the page, not the one that comes up on the top of the page.  Create a folder in the Library/Application Support folder with your business’ name (I use this as a location for storing files and such that can be used in scripts).  Alternatively you could put it in the /tmp folder if you want it to be erased after the reboot.

Now copy the SymantecRemovalTool folder you downloaded (as a zip) into that folder.  Launch Composer and drag the /Library/Application Support/businessname/SymantecRemovalTool folder into Composer.  Let Composer do it’s thing and see the copied files.  Close up Composer and all your windows and move on to the script part.

Launch your favorite shell script editor (XCode, TextEdit, whatever) and put this in the file…

#!/bin/sh
/Library/Application\ Support/businessname/SymantecRemovalTool/SymantecRemovalTool.command / -q

… save the file as SymantecRemovalScript.sh.  Fire up the terminal and make that file executable (chmod +X SymantecRemovaScript.sh).  Launch Casper Administrator and add the script you just made and the package you made from the SymantecRemovalTool folder.

Create a Policy that installs the package, then runs the script after installation.  You can also add the Anti-Virus installer that you are using to replace Symantec with.  I gave a notice that their anti-virus had changed and requested them to reboot.  If nobody was logged in then I had the machine do an automatic restart.

You should be set for the action, but my inventory seemed to not update (though I checked update inventory).  I made three Smart Computer groups to watch this and run an update.  The first group is the Group of computers that still have Symantec Endpoint Protection on them.  The second group had the new Anti-Virus on them, and the third group had both installed.

On the first group you assign the removal/replacement policy.  On the third group (the both group) you assign an update inventory policy.  The second group (new AV) you do nothing as they should all be happy.

Alternate Option:  postinstall script

You should be able to use the postinstall script to launch the SymantecRemovalScript.sh from the installer or even run the script from the postinstall, I tried both and neither worked.  The packages say it installed, but the postinstall script didn’t run.  It should have.  Your mileage may vary.  I found a work around and used that.  Let me know if it works for you as it would remove the need for the script to be uploaded separately.

Till next time.

Deploying InDesign CS 5.5 with JAMF Casper Suite without Extension errors

Save the intro for later.  Down to business.

Adobe has come a long way in the Mac installers for their products, the Adobe Application Manager Enterprise Edition (AAMEE).  However deploying it is still a process that requires some finessing.  JAMF’s Casper does a great job, but if you are not running Casper on a Mac server you are most likely going to run into issues getting it deployed without issue.  Specifically if you have your repository served out via HTTP or SMB.

The issue is a known issue, and knowing Adobe they are not going to fix it.  What I have done doesn’t fix it either, but it does get rid of the extensions so InDesign only loads 223 extensions and not 233.  The ten I took out are all related to InCopy, so if you don’t know what InCopy is or you know what it is and you don’t use it, feel free to use this code to get your InDesign CS 5.5 deployed without users calling back asking why there are errors.

The first part is to use AAMEE to create the installer.  This is documented well on JAMF’s site and Adobe’s.  Just make sure you disable AIR and continue on errors.

The second part is simple, make a script that will run after the installation and just ‘rm’ those pesky extensions away.  When InDesign launches it will register the remaining extensions and launch without issue.  I’ve opted to nuke the whole lot InCopy extensions, but you could get selective if you like.

#!/bin/sh
rm -fdr /Applications/Adobe\ InDesign\ CS5.5/Plug-Ins/InCopyWorkflow

Of course, I highly suggest you just type it out, but if you want to copy it, feel free.

Till next time.