ExtensionAttributes icon indicating copy to clipboard operation
ExtensionAttributes copied to clipboard

MAUCheckMethod relying on Python, which isn't going to be stock in macOS in the future

Open staze opened this issue 3 years ago • 2 comments

https://github.com/pbowden-msft/ExtensionAttributes/blob/master/MAU_CheckMethod.sh relies on Python, and in macOS 12 beta, is causing a warning to be thrown when the EA is evaluated about it (or rather, "jamf") not being supported in future OS versions.

Found https://tidbits.com/2019/06/25/apple-to-deprecate-scripting-languages-in-future-versions-of-macos/

Looks like Apple is about to drop Python from macOS.

Thoughts on switching to using "defaults"? or PlistBuddy?

staze avatar Jun 10 '21 01:06 staze

Looks like you should be able to do (works with my testing):

#!/bin/zsh
if [ -d /Library/Application\ Support/Microsoft/MAU2.0/Microsoft\ AutoUpdate.app ]; then
	HowToCheck=$(defaults read /Users/rstasel/Library/Preferences/com.microsoft.autoupdate2 HowToCheck 2>/dev/null)

if [ -z "$HowToCheck" ]; then    
        echo "<result>AutomaticDownload (inferred)</result>"
    else
        echo "<result>$HowToCheck</result>"
    fi
else
    echo "<result>Not installed</result>"
fi

exit 0

staze avatar Jun 10 '21 02:06 staze

@pbowden-msft

staze avatar Aug 16 '21 17:08 staze