Hi,
When I run below terminal cmd, the results are correct
Test-Catalinas-MacBook-Pro:~ catalina$ launchctl list | grep -v 'com.apple*'
Same commands triggered with applescript with administrator privileges, it retunrs me system launchd lists
sudo -u catalina launchctl list | grep -v 'com.apple*'
Also, I am not able query tcc.db from catalina using same approach. (bash script running via apple script)
sudo -u catalina sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'SELECT * from access' | grep kTCCServiceSystemPolicyAllFiles
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'SELECT * from access' | grep kTCCServiceSystemPolicyAllFiles
DB query returns "unable to open"
My System Version: macOS 10.15 (19A573a)
To reproduce this:
- create a bash script
- run it with help of apple script
ASC below
set meFolder to (path tome) as string
try
set pathToScript to quoted form of ((POSIX path of meFolder) & "/Contents/Resources/Scripts/script.sh")
end try
try
set scriptOutput to do shell script (pathToScript) with administrator privileges
endtry