Shell scripting help with Adobe creative cloud cleaner tool

New Contributor

Hi there, need assistance in scripting as have modified a script to download the creative cloud cleaner tool to /tmp/ and to run then delete after it has run. I am wanting this to run before the installer will run the Latest version of Adobe products as there are some Macs with two versions already installed:



curl$VendorDMG -o /tmp/$VendorDMG

# Mount the DMG Installer file
hdiutil attach /tmp/$VendorDMG -nobrowse

#Copy App to tmp
sudo cp -pPR /Volumes/CleanerTool/Adobe\ Creative\ Cloud\ Cleaner\ /tmp/

#Run creative tool app

echo "Running the CC Cleaner app with 'removeAll=All' option"
/tmp/Adobe\ Creative\ Cloud\ Cleaner\\ Creative\ Cloud\ Cleaner\ Tool --removeAll=All --eulaAccepted=1

#delete app
sudo rm -rf /tmp/Adobe\ Creative\ Cloud\ Cleaner\

# Unmount the DMG Installer file
hdiutil detach -force /volumes/cleanerTool

# Delete the DMG Installer file
rm -f /tmp/$VendorDMG

My problem I'm having is that it fails to run the below at the loginwindow:

"/tmp/Adobe\ Creative\ Cloud\ Cleaner\\ Creative\ Cloud\ Cleaner\ Tool --removeAll=All --eulaAccepted=1"

The error I get is see below:

Adobe Creative Cloud Cleaner Tool[4440:45981] Console user name found to be loginwindow, Exiting CT with ERROR_CT_INVALID_CONSOLE_USERNAME Exception

"disk3" ejected.

Any scripting assistance would be greatly received to get the creative cloud cleaner tool to work at login window if possible.


Contributor III

This is a limitation of this version of the Cleaner Tool.  Create a temporary user, log in as that, run your script above, log out, delete the temporary user.  It'd be nice if more vendors recognized that utilities deployed at fleet scale should work from the loginwindow ("headless").

New Contributor

Sorry to bump such an old topic, but this seems to be the only result for the ERROR_CT_INVALID_CONSOLE_USERNAME  error message.

@pete_cWhen you say "Create a temporary user, [...]" do you mean manually, on the machine itself? or have you found a way to do it programmatically? I tried doing it in bash, but I can't seem to get the script to run silently without the admin prompt popping up:

dscl . -create /Users/tempAdobeRemovalAccount
dscl . -create /Users/tempAdobeRemovalAccount UserShell /bin/bash
dscl . -create /Users/tempAdobeRemovalAccount RealName "temp AdobeRemovalAccount"
dscl . -create /Users/tempAdobeRemovalAccount UniqueID "590"
dscl . -create /Users/tempAdobeRemovalAccount PrimaryGroupID 80
dscl . -create /Users/tempAdobeRemovalAccount NFSHomeDirectory /Users/tempAdobeRemovalAccount
dscl . -passwd /Users/tempAdobeRemovalAccount 1234

hdiutil attach $VendorDMG -nobrowse

cp -pPR /Volumes/CleanerTool/Adobe\ Creative\ Cloud\ Cleaner\ /tmp/

echo 'tempAdobeRemovalAccount ALL = (root) NOPASSWD: /tmp/Adobe\ Creative\ Cloud\ Cleaner\\ Creative\ Cloud\ Cleaner\ Tool --removeAll=All --eulaAccepted=1' | sudo EDITOR='tee -a' visudo

sudo -u tempAdobeRemovalAccount /tmp/Adobe\ Creative\ Cloud\ Cleaner\\ Creative\ Cloud\ Cleaner\ Tool --removeAll=All --eulaAccepted=1

rm -rf /tmp/Adobe\ Creative\ Cloud\ Cleaner\

hdiutil detach -force /volumes/CleanerTool

dscl . -delete /Users/tempAdobeRemovalAccount

 I tried adding the command to the sudoers file with NOPASSWD, but it still creates a popup asking admin credentials.