Hello Friends,
I have a script which will run on mac and pop up will appear to enter your host name.
Issue- I- am getting this error (Script result: 37:45: execution error: System Events got an error: Application isn’t running. (-600)
Rename Successful), how to solve this? Actually pop up is not appearing but if i use, sudo jamf policy then i am getting pop and able to rename
Issue -2 - how can i add one logo on pop up?
Script
#!/bin/bash
#Freddie Cox for Knox County Schools
#Edited by Justin Ellis
#2012
ComputerName=`/usr/bin/osascript <<EOT
tell application "System Events"
activate
set ComputerName to text returned of (display dialog "Please Input New Computer Name as LT with asset number of the laptop EX-LT1234, Asset number can be found on bottom of your laptop" default answer "" with icon 2)
end tell
EOT`
#Set New Computer Name
echo $ComputerName
scutil --set HostName $ComputerName
scutil --set LocalHostName $ComputerName
scutil --set ComputerName $ComputerName
echo Rename Successful
