Posted on 08-16-2019 06:58 AM
Been reading through a lot of methods for uninstalling Adobe CS6 and I found a neat tool I'd like to use, it works great running locally on clients. Now I'm building a policy that includes a pkg (which dumps the unix executable and xml file into the tmp folder) and I need to call the executable. Thinking its best to build a little script add that calls the executable over adding to the Run command of the policy, but need some scripting guidance!
Posted on 08-16-2019 08:29 AM
Call it with a postinstall script right in the package. Postinstall scripts run as root by default. maybe if you wanna get cute include an “echo” line in your script that gives you a log that your script actually ran.
Posted on 08-16-2019 10:09 AM
Ahhh, never used a postinstall in a pkg, thanks for the tip @blackholemac . Reading up now on how to get that in
#!/usr/bin/perl
## postinstall
$pathToScript=$0;
$pathToPackage=$ARGV[0];
$targetLocation=$ARGV[1];
$targetVolume=$ARGV[2];
exit 0; ## Success
exit 1; ## Failure
Posted on 08-20-2019 10:20 AM
Was able to get this functioning using this but the tool doesn't remove CS6.
#!/bin/bash
if [[ ! -e "/Library/Logs/Adobe" ]]; then
echo "/Library/Logs/Adobe directory does not exist, creating..."
mkdir -p "/Library/Logs/Adobe"
fi
/private/tmp/AdobeUninstall/AdobeCCUninstaller | /usr/bin/tee "/Library/Logs/Adobe/AdobeUninstallUnauthorizedVersions_$(/bin/date +%F-%H%M%S).log"