targendaz2 / Mac-Set-Default-Apps

A utility to change default applications in macOS
MIT License
85 stars 10 forks source link

MDM deployment #5

Closed bezik46 closed 2 years ago

bezik46 commented 2 years ago

Gives me only an error:

A somewhat complete list of UTI's can be found here: https://escapetech.eu/manuals/qdrop/uti.html: No such file or directory from: can't read /var/mail/__future__ /usr/local/bin/msda: line 12: import: command not found from: can't read /var/mail/argparse from: can't read /var/mail/platform from: can't read /var/mail/plistlib from: can't read /var/mail/tempfile /usr/local/bin/msda: line 25: JAMF: command not found /usr/local/bin/msda: line 26: TMP_PREFIX: command not found /usr/local/bin/msda: line 27: USER_HOMES_LOCATION: command not found /usr/local/bin/msda: line 36: __author__: command not found /usr/local/bin/msda: line 37: __copyright__: command not found /usr/local/bin/msda: line 38: __license__: command not found /usr/local/bin/msda: line 39: __version__: command not found /usr/local/bin/msda: line 40: __email__: command not found /usr/local/bin/msda: line 49: EXTENSION_UTI: command not found /usr/local/bin/msda: line 50: LSREGISTER_BINARY: command not found /usr/local/bin/msda: line 51: syntax error near unexpected token(' /usr/local/bin/msda: line 51: OS_VERSION = float(mac_ver()[0][3:])'

targendaz2 commented 2 years ago

@scerazy Could you give me steps to reproduce this?

bezik46 commented 2 years ago

I was trying to run it in Mosyle MDM as a user with their Custom Command:

` All Custom Commands will be run at the root level. If you need the command to run as the local logged in user, please preface your command with the following script:

Will run all commands as the user

sudo -u $(stat -f "%Su" /dev/console) /bin/sh <<'END' `

Had to run normal, but reference full path, which worked fine:

`

!/bin/bash

/usr/local/bin/msda set com.microsoft.edgemac -p http -p https -u public.url all -u public.html viewer -u public.xhtml all -fut `

targendaz2 commented 2 years ago

So were you able to get it working?

bezik46 commented 2 years ago

Yes! Thanks