I have a really simple script that is suppose to run when the user logs into the computer to set the computer name. However even through the log file says it runs, it doesn't show up on the client machine.
I have tried jamf manage and jamf update but no go.
Any suggestions to get it working?
Would it be because it is running as root and the end user never sees the prompt? Make sure you are running as the logged in user.
I am using cocoadialog to do a similar thing but making sure it is running as the current logged in user. Not sure how you would do that in Apple Script but im sure you can google it
Applescript should display for the currently logged in user regardless.
I don't think you need to tell "System Events" either just go straight to the dialog
#!/bin/sh assignment=$(osascript<<END set assignment to the text returned of (display dialog "Please Enter Computer Name" default answer "") END) echo $assignment
@anickless I think that might be a function of 10.11 and 10.12, I had to adjust a few of my login scripts that used Applescript to activate a little later in the login process for them to work correctly (not dialogs but other functions), I think 10.12 especially has change the order or how long some of the login items take.
I generally divorce the contents of the script away and then have it wait for the finder to fully load before attempting the tasks.