I'm having trouble pushing a script with Casper Remote. We are trying to add OneDrive added to the list of login items for all of our students. The script I'm using works perfect if I run it locally through terminal. When I run it with Casper Remote I get the error:
36:140: execution error: An error of type -10810 has occurred. (-10810)
Any ideas?
#!/bin/sh
sudo osascript -e 'tell application "System Events" to make login item at end with properties {path:"Applications/OneDrive.app", hidden:true , name:"OneDrive"}'
echo 0