Skip to main content
Question

Applescript at Reboot problem

  • August 16, 2013
  • 1 reply
  • 0 views

Forum|alt.badge.img+1

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.

1 reply

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • August 16, 2013

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings