Script Help Needed for Unix Executable - Adobe CS Uninstall

TomDay
Release Candidate Programs Tester

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!
68efbc2b354d443bb511930c63672327

3 REPLIES 3

blackholemac
Valued Contributor III

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.

TomDay
Release Candidate Programs Tester

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

TomDay
Release Candidate Programs Tester

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"