Posted on 08-16-2013 05:22 AM
We have a script set up in Applescript for user creation, drive mapping and program installs for post config but it won't kick off from Casper. I've set it for "on reboot" and still nothing. Privileges all seem fine on it, if I create a shell script that calls the applescript file it will attempt to open it up, but then I get an error that says "applescript no user interaction allowed" and won't run the script past that.
Does Casper handle applescripts differently then shell scripts? My shell scripts always seem to execute just fine on reboot.
Posted on 08-16-2013 05:46 AM
The Casper Suite runs scripts or applications as root, so the issue you're running into is that the OS doesn't allow you to run a script or application that requires user interaction when its done as a user that isn't the owner of console. "root" isn't logged in when the application tries to run, so it can't interact with the user interface.
Take a look at this post just for an example of this issue and one way to get around it:
https://jamfnation.jamfsoftware.com/discussion.html?id=6414
Another way to do this would be to craft a LaunchAgent that opens the application instead, since LaunchAgents open files or scripts as the logged in user, thus getting around the above issue.