Script for change background in macOS via Kace
I managed to make a script using AppleScript and sending it via Kace, however a box always appears that asks for "OK" for "konea" to control "System Events" and this is unfeasible, as the idea was that it would be automated without any action from the user. Anyone who has done something like this that can help?
Here's what I've done and it didn't require any user interaction.
1. Create an Online Shell Script
2. Upload your image as a dependency
3. Use this script "osascript -e 'tell application "Finder" to set desktop picture to POSIX file "$(KACE_DEPENDENCY_DIR)/*fileName*"'
4. Name the script file "*.sh"