currently making an EA to determine the default mail client on the mac but if i run the python script on my machine without sudo, its the correct value, but if i sudo the script, its the wrong value.
is there a way i can run the script/command as the user or have it only give the result for the user?
i also tested running the script that changes from com.apple.mail to com.microsoft.Outlook but the user's EA still shows apple mail and when i ssh and run the command on his box as another user, it shows as apple mail too.
here is the line to change it:
LSSetDefaultHandlerForURLScheme("mailto", "com.microsoft.outlook")
here is the line to read it for the ea
LSCopyDefaultHandlerForURLScheme("mailto")