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?

0 Comments   [ + ] Show comments

Answers (2)

Posted by: Nick_F 1 year ago
Senior White Belt

Hey Erly,

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"

5.  Save


Posted by: Erly 1 year ago
White Belt

Following this step gives me this error: error "Finder got an error: The AppleEvent controller failed." number -10000.

And anyway "konea" asked for access to "Finder".

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ